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