Console: BugFix - On iPhone 6+ (landscape mode), keep open the selected room when user changes application tabs.

This commit is contained in:
giomfo 2015-02-12 13:35:07 +01:00
parent e5f6fe1014
commit 23f80689ff

View file

@ -148,12 +148,14 @@
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated]; [super viewDidAppear:animated];
// Release potential Room ViewController if none is visible (Note: check on room visibility is required to handle correctly splitViewController) // Release the current selected room (if any) except if the Room ViewController is still visible (see splitViewController.isCollapsed condition)
if ([AppDelegate theDelegate].masterTabBarController.visibleRoomId == nil && currentRoomViewController) { if (!self.splitViewController || self.splitViewController.isCollapsed) {
if (currentRoomViewController) {
currentRoomViewController.roomId = nil; currentRoomViewController.roomId = nil;
currentRoomViewController = nil; currentRoomViewController = nil;
} }
} }
}
#pragma mark - #pragma mark -