mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Retain new room creatino bridge presenter
This commit is contained in:
parent
f2d4e0174a
commit
500a80d0d0
1 changed files with 14 additions and 3 deletions
|
@ -34,7 +34,7 @@
|
|||
|
||||
#import "Riot-Swift.h"
|
||||
|
||||
@interface RecentsViewController ()
|
||||
@interface RecentsViewController () <CreateRoomCoordinatorBridgePresenterDelegate>
|
||||
{
|
||||
// Tell whether a recents refresh is pending (suspended during editing mode).
|
||||
BOOL isRefreshPending;
|
||||
|
@ -66,6 +66,8 @@
|
|||
id kThemeServiceDidChangeThemeNotificationObserver;
|
||||
}
|
||||
|
||||
@property (nonatomic, strong) CreateRoomCoordinatorBridgePresenter *createRoomCoordinatorBridgePresenter;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RecentsViewController
|
||||
|
@ -1711,8 +1713,9 @@
|
|||
// Sanity check
|
||||
if (self.mainSession)
|
||||
{
|
||||
CreateRoomCoordinatorBridgePresenter *presenter = [[CreateRoomCoordinatorBridgePresenter alloc] initWithSession:self.mainSession];
|
||||
[presenter presentFrom:self animated:YES];
|
||||
self.createRoomCoordinatorBridgePresenter = [[CreateRoomCoordinatorBridgePresenter alloc] initWithSession:self.mainSession];
|
||||
self.createRoomCoordinatorBridgePresenter.delegate = self;
|
||||
[self.createRoomCoordinatorBridgePresenter presentFrom:self animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1958,4 +1961,12 @@
|
|||
[self.recentsSearchBar setShowsCancelButton:NO animated:NO];
|
||||
}
|
||||
|
||||
#pragma mark - CreateRoomCoordinatorBridgePresenterDelegate
|
||||
|
||||
- (void)createRoomCoordinatorBridgePresenterDelegateDidCancel:(CreateRoomCoordinatorBridgePresenter *)coordinatorBridgePresenter
|
||||
{
|
||||
[coordinatorBridgePresenter dismissWithAnimated:YES completion:nil];
|
||||
coordinatorBridgePresenter = nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue