mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 16:22:39 +00:00
Console: BugFix - On iPhone 6+ (landscape mode), keep open the selected room when user changes application tabs.
This commit is contained in:
parent
e5f6fe1014
commit
23f80689ff
1 changed files with 6 additions and 4 deletions
|
@ -148,10 +148,12 @@
|
|||
- (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) {
|
||||
currentRoomViewController.roomId = nil;
|
||||
currentRoomViewController = nil;
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue