fix setting view won't expand after quitting remote session

This commit is contained in:
True Zhuanjia committed 2024-07-05 19:35:07 +08:00
1 parent 8437c8ada1
commit b4cfe21074
1 file changed
+6 -4
@@ -967,10 +967,7 @@ static NSMutableSet* hostList;
{ {
[super viewDidLoad]; [super viewDidLoad];
[self attachWaterMark]; [self attachWaterMark];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(simulateSettingsButtonPress) // //force expand settings view to update resolution table, and all setting includes current fullscreen resolution will be updated.
name:UIDeviceOrientationDidChangeNotification
object:nil];
#if !TARGET_OS_TV #if !TARGET_OS_TV
// Set the side bar button action. When it's tapped, it'll show the sidebar. // Set the side bar button action. When it's tapped, it'll show the sidebar.
[_settingsButton setTarget:self.revealViewController]; [_settingsButton setTarget:self.revealViewController];
@@ -1145,6 +1142,11 @@ static NSMutableSet* hostList;
[super viewDidAppear:animated]; [super viewDidAppear:animated];
#if !TARGET_OS_TV #if !TARGET_OS_TV
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(simulateSettingsButtonPress) // //force expand settings view to update resolution table, and all setting includes current fullscreen resolution will be updated.
name:UIDeviceOrientationDidChangeNotification
object:nil];
[[self revealViewController] setPrimaryViewController:self]; [[self revealViewController] setPrimaryViewController:self];
#endif #endif