mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Retain new room creatino bridge presenter
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user