mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
Settings: Close the current room when user enables/disables all events display (Room details will be available at the end of initial sync).
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
- (void)dealloc {
|
||||
if (currentRoomViewController) {
|
||||
currentRoomViewController.roomId = nil;
|
||||
currentRoomViewController = nil;
|
||||
}
|
||||
if (recentsListener) {
|
||||
[[MatrixHandler sharedHandler].mxSession removeListener:recentsListener];
|
||||
@@ -107,6 +108,12 @@
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
// Release potential Room ViewController
|
||||
if (currentRoomViewController) {
|
||||
currentRoomViewController.roomId = nil;
|
||||
currentRoomViewController = nil;
|
||||
}
|
||||
|
||||
// Refresh display
|
||||
[self configureView];
|
||||
[[MatrixHandler sharedHandler] addObserver:self forKeyPath:@"isInitialSyncDone" options:0 context:nil];
|
||||
@@ -336,12 +343,6 @@
|
||||
}
|
||||
|
||||
if ([controller isKindOfClass:[RoomViewController class]]) {
|
||||
if (currentRoomViewController) {
|
||||
if ((currentRoomViewController != controller) || (![currentRoomViewController.roomId isEqualToString:recentRoom.roomId])) {
|
||||
// Release the current one
|
||||
currentRoomViewController.roomId = nil;
|
||||
}
|
||||
}
|
||||
currentRoomViewController = (RoomViewController *)controller;
|
||||
currentRoomViewController.roomId = recentRoom.roomId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user