SP3.1: Update room settings for Spaces #5231

- Update after review
This commit is contained in:
Gil Eluard
2022-02-28 16:07:09 +01:00
parent 3a9b6b248b
commit bca69bb7c8
52 changed files with 878 additions and 519 deletions
+2 -2
View File
@@ -349,8 +349,8 @@ extension RoomCoordinator: RoomViewControllerDelegate {
self.delegate?.roomCoordinator(self, didSelectRoomWithId: roomID, eventId: eventID)
}
func roomViewController(_ roomViewController: RoomViewController, moveToRoomWithId roomID: String) {
self.delegate?.roomCoordinator(self, moveToRoomWithId: roomID)
func roomViewController(_ roomViewController: RoomViewController, didReplaceRoomWithReplacementId roomID: String) {
self.delegate?.roomCoordinator(self, didReplaceRoomWithReplacementId: roomID)
}
func roomViewController(_ roomViewController: RoomViewController, showMemberDetails roomMember: MXRoomMember) {
@@ -21,7 +21,7 @@ import Foundation
func roomCoordinatorBridgePresenter(_ bridgePresenter: RoomCoordinatorBridgePresenter,
didSelectRoomWithId roomId: String,
eventId: String?)
func roomCoordinatorBridgePresenter(_ bridgePresenter: RoomCoordinatorBridgePresenter, moveToRoomWithId roomId: String)
func roomCoordinatorBridgePresenter(_ bridgePresenter: RoomCoordinatorBridgePresenter, didReplaceRoomWithReplacementId roomId: String)
func roomCoordinatorBridgePresenterDidDismissInteractively(_ bridgePresenter: RoomCoordinatorBridgePresenter)
}
@@ -180,8 +180,8 @@ extension RoomCoordinatorBridgePresenter: RoomCoordinatorDelegate {
self.delegate?.roomCoordinatorBridgePresenter(self, didSelectRoomWithId: roomId, eventId: eventId)
}
func roomCoordinator(_ coordinator: RoomCoordinatorProtocol, moveToRoomWithId roomId: String) {
self.delegate?.roomCoordinatorBridgePresenter(self, moveToRoomWithId: roomId)
func roomCoordinator(_ coordinator: RoomCoordinatorProtocol, didReplaceRoomWithReplacementId roomId: String) {
self.delegate?.roomCoordinatorBridgePresenter(self, didReplaceRoomWithReplacementId: roomId)
}
func roomCoordinatorDidLeaveRoom(_ coordinator: RoomCoordinatorProtocol) {
@@ -22,7 +22,7 @@ protocol RoomCoordinatorDelegate: AnyObject {
func roomCoordinatorDidLeaveRoom(_ coordinator: RoomCoordinatorProtocol)
func roomCoordinatorDidCancelRoomPreview(_ coordinator: RoomCoordinatorProtocol)
func roomCoordinator(_ coordinator: RoomCoordinatorProtocol, didSelectRoomWithId roomId: String, eventId: String?)
func roomCoordinator(_ coordinator: RoomCoordinatorProtocol, moveToRoomWithId roomId: String)
func roomCoordinator(_ coordinator: RoomCoordinatorProtocol, didReplaceRoomWithReplacementId roomId: String)
func roomCoordinatorDidDismissInteractively(_ coordinator: RoomCoordinatorProtocol)
}
@@ -226,7 +226,7 @@ extension RoomInfoCoordinator: RoomNotificationSettingsCoordinatorDelegate {
}
extension RoomInfoCoordinator: RoomSettingsViewControllerDelegate {
func roomSettingsViewController(_ controller: RoomSettingsViewController!, didMoveRoomTo newRoomId: String!) {
self.delegate?.roomInfoCoordinator(self, didMoveToRoomWithId: newRoomId)
func roomSettingsViewController(_ controller: RoomSettingsViewController!, didReplaceRoomWithReplacementId newRoomId: String!) {
self.delegate?.roomInfoCoordinator(self, didReplaceRoomWithReplacementId: newRoomId)
}
}
@@ -22,7 +22,7 @@ import Foundation
func roomInfoCoordinatorBridgePresenterDelegateDidComplete(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter)
func roomInfoCoordinatorBridgePresenter(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter, didRequestMentionForMember member: MXRoomMember)
func roomInfoCoordinatorBridgePresenterDelegateDidLeaveRoom(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter)
func roomInfoCoordinatorBridgePresenter(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter, didMoveToRoomWithId roomId: String)
func roomInfoCoordinatorBridgePresenter(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter, didReplaceRoomWithReplacementId roomId: String)
}
/// RoomInfoCoordinatorBridgePresenter enables to start RoomInfoCoordinator from a view controller.
@@ -126,8 +126,8 @@ extension RoomInfoCoordinatorBridgePresenter: RoomInfoCoordinatorDelegate {
self.delegate?.roomInfoCoordinatorBridgePresenterDelegateDidLeaveRoom(self)
}
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, didMoveToRoomWithId roomId: String) {
self.delegate?.roomInfoCoordinatorBridgePresenter(self, didMoveToRoomWithId: roomId)
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, didReplaceRoomWithReplacementId roomId: String) {
self.delegate?.roomInfoCoordinatorBridgePresenter(self, didReplaceRoomWithReplacementId: roomId)
}
}
@@ -22,7 +22,7 @@ protocol RoomInfoCoordinatorDelegate: AnyObject {
func roomInfoCoordinatorDidComplete(_ coordinator: RoomInfoCoordinatorType)
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, didRequestMentionForMember member: MXRoomMember)
func roomInfoCoordinatorDidLeaveRoom(_ coordinator: RoomInfoCoordinatorType)
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, didMoveToRoomWithId roomId: String)
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, didReplaceRoomWithReplacementId roomId: String)
}
/// `RoomInfoCoordinatorType` is a protocol describing a Coordinator that handle keybackup setup navigation flow.
+2 -2
View File
@@ -162,13 +162,13 @@ extern NSNotificationName const RoomGroupCallTileTappedNotification;
eventId:(nullable NSString *)eventID;
/**
Tells the delegate that the room has been moved to a new room.
Tells the delegate that the room has replaced by a room with a specific replacement room ID.
@param roomViewController the `RoomViewController` instance.
@param roomID the replacement roomId
*/
- (void)roomViewController:(RoomViewController *)roomViewController
moveToRoomWithId:(NSString *)roomID;
didReplaceRoomWithReplacementId:(NSString *)roomID;
/**
Tells the delegate that the user wants to start a direct chat with a user.
+2 -2
View File
@@ -7050,11 +7050,11 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
}
}
- (void)roomInfoCoordinatorBridgePresenter:(RoomInfoCoordinatorBridgePresenter *)coordinatorBridgePresenter didMoveToRoomWithId:(NSString *)roomId
- (void)roomInfoCoordinatorBridgePresenter:(RoomInfoCoordinatorBridgePresenter *)coordinatorBridgePresenter didReplaceRoomWithReplacementId:(NSString *)roomId
{
if (self.delegate)
{
[self.delegate roomViewController:self moveToRoomWithId:roomId];
[self.delegate roomViewController:self didReplaceRoomWithReplacementId:roomId];
}
else
{
@@ -69,6 +69,6 @@ typedef enum : NSUInteger {
@protocol RoomSettingsViewControllerDelegate <NSObject>
- (void)roomSettingsViewController:(RoomSettingsViewController *)controller didMoveRoomTo:(NSString *)newRoomId;
- (void)roomSettingsViewController:(RoomSettingsViewController *)controller didReplaceRoomWithReplacementId:(NSString *)newRoomId;
@end
@@ -4209,7 +4209,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
{
if (![roomId isEqualToString: self.roomId]) {
// Room Access Coordinator upgraded the actual room -> Need to move to replacement room
[self.delegate roomSettingsViewController:self didMoveRoomTo:roomId];
[self.delegate roomSettingsViewController:self didReplaceRoomWithReplacementId:roomId];
}
MXWeakify(self);
@@ -4223,7 +4223,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
{
if (![roomId isEqualToString: self.roomId]) {
// Room Access Coordinator upgraded the actual room -> Need to move to replacement room
[self.delegate roomSettingsViewController:self didMoveRoomTo:roomId];
[self.delegate roomSettingsViewController:self didReplaceRoomWithReplacementId:roomId];
}
MXWeakify(self);
@@ -4243,7 +4243,9 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
- (void)roomSuggestionCoordinatorBridgePresenterDelegateDidComplete:(RoomSuggestionCoordinatorBridgePresenter *)coordinatorBridgePresenter
{
MXWeakify(self);
[roomSuggestionPresenter dismissWithAnimated:YES completion:^{
MXStrongifyAndReturnIfNil(self);
self->roomSuggestionPresenter = nil;
[self refreshRoomSettings];
}];