mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Public rooms search: Made sure the room is no more selected when leaving the rooom page
This commit is contained in:
parent
0caeb839c6
commit
f2d847ea4d
3 changed files with 11 additions and 9 deletions
|
@ -50,7 +50,12 @@
|
|||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
if (self.splitViewController && !self.splitViewController.isCollapsed)
|
||||
// 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)
|
||||
{
|
||||
[[AppDelegate theDelegate].homeViewController closeSelectedRoom];
|
||||
}
|
||||
else
|
||||
{
|
||||
// In case of split view controller where the primary and secondary view controllers are displayed side-by-side onscreen,
|
||||
// the selected room (if any) is highlighted.
|
||||
|
|
|
@ -192,8 +192,7 @@
|
|||
[super viewDidAppear:animated];
|
||||
|
||||
// Release the current selected room (if any) except if the Room ViewController is still visible (see splitViewController.isCollapsed condition)
|
||||
// Note: 'isCollapsed' property is available in UISplitViewController for iOS 8 and later.
|
||||
if (!self.splitViewController || ([self.splitViewController respondsToSelector:@selector(isCollapsed)] && self.splitViewController.isCollapsed))
|
||||
if (!self.splitViewController || self.splitViewController.isCollapsed)
|
||||
{
|
||||
// Release the current selected room (if any).
|
||||
[self closeSelectedRoom];
|
||||
|
@ -210,9 +209,8 @@
|
|||
{
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
// TODO: Check why it was done before
|
||||
//_selectedRoomId = nil;
|
||||
//_selectedRoomSession = nil;
|
||||
_selectedRoomId = nil;
|
||||
_selectedRoomSession = nil;
|
||||
}
|
||||
|
||||
- (void) viewDidLayoutSubviews
|
||||
|
|
|
@ -120,11 +120,10 @@
|
|||
[super viewDidAppear:animated];
|
||||
|
||||
// Release the current selected room (if any) except if the Room ViewController is still visible (see splitViewController.isCollapsed condition)
|
||||
// Note: 'isCollapsed' property is available in UISplitViewController for iOS 8 and later.
|
||||
if (!self.splitViewController || ([self.splitViewController respondsToSelector:@selector(isCollapsed)] && self.splitViewController.isCollapsed))
|
||||
if (!self.splitViewController || self.splitViewController.isCollapsed)
|
||||
{
|
||||
// Release the current selected room (if any).
|
||||
//[self closeSelectedRoom];
|
||||
[homeViewController closeSelectedRoom];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue