mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-04 23:17:43 +02:00
Recents: Bug fix recents getting stuck after fiddling 'show all events' and 'hide unsupported messages' in settings
This commit is contained in:
@@ -303,7 +303,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
||||
if (direction == MXEventDirectionForwards) {
|
||||
// Check user's membership in live room state (Indeed we have to go back on recents when user leaves, or is kicked/banned)
|
||||
if (mxRoom.state.membership == MXMembershipLeave || mxRoom.state.membership == MXMembershipBan) {
|
||||
[self.navigationController popViewControllerAnimated:NO];
|
||||
[[AppDelegate theDelegate].masterTabBarController popRoomViewControllerAnimated:NO];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
|
||||
if ([@"displayAllEvents" isEqualToString:keyPath]) {
|
||||
// Back to recents (Room details are not available until the end of initial sync)
|
||||
[self.navigationController popViewControllerAnimated:NO];
|
||||
[[AppDelegate theDelegate].masterTabBarController popRoomViewControllerAnimated:NO];
|
||||
} else if ([@"hideUnsupportedMessages" isEqualToString:keyPath]) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self configureView];
|
||||
@@ -1128,7 +1128,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
||||
MXRoom *currentRoom = [[MatrixHandler sharedHandler].mxSession roomWithRoomId:weakSelf.roomId];
|
||||
[currentRoom leave:^{
|
||||
// Back to recents
|
||||
[weakSelf.navigationController popViewControllerAnimated:YES];
|
||||
[[AppDelegate theDelegate].masterTabBarController popRoomViewControllerAnimated:YES];
|
||||
} failure:^(NSError *error) {
|
||||
NSLog(@"Leave room %@ failed: %@", weakSelf.roomId, error);
|
||||
//Alert user
|
||||
|
||||
Reference in New Issue
Block a user