mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 21:26:57 +02:00
BugFix: App crashes on iPhone 6S in case of rotation on login screen.
Previous fix was incomplete (https://github.com/vector-im/vector-ios/commit/f1b0917a8763647725bee805e8e750129191d700)
This commit is contained in:
@@ -280,14 +280,14 @@
|
||||
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
// Observe network reachability
|
||||
[[AppDelegate theDelegate] addObserver:self forKeyPath:@"isOffline" options:0 context:nil];
|
||||
[self refreshActivitiesViewDisplay];
|
||||
|
||||
if (self.roomDataSource)
|
||||
{
|
||||
// Set visible room id
|
||||
[AppDelegate theDelegate].visibleRoomId = self.roomDataSource.roomId;
|
||||
|
||||
// Observe network reachability
|
||||
[[AppDelegate theDelegate] addObserver:self forKeyPath:@"isOffline" options:0 context:nil];
|
||||
[self refreshActivitiesViewDisplay];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,10 +295,13 @@
|
||||
{
|
||||
[super viewDidDisappear:animated];
|
||||
|
||||
[[AppDelegate theDelegate] removeObserver:self forKeyPath:@"isOffline"];
|
||||
|
||||
// Reset visible room id
|
||||
[AppDelegate theDelegate].visibleRoomId = nil;
|
||||
if ([AppDelegate theDelegate].visibleRoomId)
|
||||
{
|
||||
[AppDelegate theDelegate].visibleRoomId = nil;
|
||||
|
||||
[[AppDelegate theDelegate] removeObserver:self forKeyPath:@"isOffline"];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidLayoutSubviews
|
||||
|
||||
Reference in New Issue
Block a user