selection impossible when filtering in add room screen #5757 (#5758)

- Fixed
- Other minor code / UI tweaks
This commit is contained in:
Gil Eluard
2022-03-07 12:25:50 +01:00
committed by GitHub
parent 59038e18c1
commit cf015c4ef2
30 changed files with 64 additions and 31 deletions
@@ -247,4 +247,8 @@ extension RoomInfoCoordinator: RoomSettingsViewControllerDelegate {
func roomSettingsViewController(_ controller: RoomSettingsViewController!, didReplaceRoomWithReplacementId newRoomId: String!) {
self.delegate?.roomInfoCoordinator(self, didReplaceRoomWithReplacementId: newRoomId)
}
func roomSettingsViewControllerDidLeaveRoom(_ controller: RoomSettingsViewController!) {
self.delegate?.roomInfoCoordinatorDidLeaveRoom(self)
}
}
-5
View File
@@ -2260,12 +2260,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
- (void)notifyDelegateOnLeaveRoomIfNecessary {
if (self.delegate)
{
// Leaving room often triggers multiple events, incl local delegate callbacks as well as global notifications,
// which may lead to multiple identical UI changes (navigating to home, displaying notification etc).
// To avoid this, as soon as we notify the delegate the first time, we nilify it, preventing future messages
// from being passed along, assuming that after leaving a room there is nothing else to communicate to the delegate.
[self.delegate roomViewControllerDidLeaveRoom:self];
self.delegate = nil;
}
else
{
@@ -69,6 +69,8 @@ typedef enum : NSUInteger {
@protocol RoomSettingsViewControllerDelegate <NSObject>
- (void)roomSettingsViewControllerDidLeaveRoom:(RoomSettingsViewController *)controller;
- (void)roomSettingsViewController:(RoomSettingsViewController *)controller didReplaceRoomWithReplacementId:(NSString *)newRoomId;
- (void)roomSettingsViewControllerDidCancel:(RoomSettingsViewController *)controller;
@@ -3667,7 +3667,11 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
[self startActivityIndicator];
[self->mxRoom leave:^{
[[LegacyAppDelegate theDelegate] restoreInitialDisplay:nil];
if (self.delegate) {
[self.delegate roomSettingsViewControllerDidLeaveRoom:self];
} else {
[[LegacyAppDelegate theDelegate] restoreInitialDisplay:nil];
}
} failure:^(NSError *error) {