mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
- Fixed - Other minor code / UI tweaks
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user