mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Knocking feature polishing part 2 (#3738)
* improved implementation of the unknown state * forget button in the banned state * error handling for forbidden access * added the forget function fixed DMs, and updated preview tests * removed banned room proxy * code polishing and test improvement
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 54;
|
objectVersion = 56;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXAggregateTarget section */
|
/* Begin PBXAggregateTarget section */
|
||||||
@@ -1359,7 +1359,7 @@
|
|||||||
044E501B8331B339874D1B96 /* CompoundIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompoundIcon.swift; sourceTree = "<group>"; };
|
044E501B8331B339874D1B96 /* CompoundIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompoundIcon.swift; sourceTree = "<group>"; };
|
||||||
045253F9967A535EE5B16691 /* Label.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Label.swift; sourceTree = "<group>"; };
|
045253F9967A535EE5B16691 /* Label.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Label.swift; sourceTree = "<group>"; };
|
||||||
046C0D3F53B0B5EF0A1F5BEA /* RoomSummaryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryTests.swift; sourceTree = "<group>"; };
|
046C0D3F53B0B5EF0A1F5BEA /* RoomSummaryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryTests.swift; sourceTree = "<group>"; };
|
||||||
048A21188AB19349D026BECD /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
048A21188AB19349D026BECD /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||||
04BB8DDE245ED86C489BA983 /* AccessibilityIdentifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessibilityIdentifiers.swift; sourceTree = "<group>"; };
|
04BB8DDE245ED86C489BA983 /* AccessibilityIdentifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessibilityIdentifiers.swift; sourceTree = "<group>"; };
|
||||||
04DF593C3F7AF4B2FBAEB05D /* FileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileManager.swift; sourceTree = "<group>"; };
|
04DF593C3F7AF4B2FBAEB05D /* FileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileManager.swift; sourceTree = "<group>"; };
|
||||||
0516C69708D5CBDE1A8E77EC /* RoomDirectorySearchProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDirectorySearchProxyProtocol.swift; sourceTree = "<group>"; };
|
0516C69708D5CBDE1A8E77EC /* RoomDirectorySearchProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDirectorySearchProxyProtocol.swift; sourceTree = "<group>"; };
|
||||||
@@ -1429,7 +1429,7 @@
|
|||||||
128501375217576AF0FE3E92 /* RoomAttachmentPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomAttachmentPicker.swift; sourceTree = "<group>"; };
|
128501375217576AF0FE3E92 /* RoomAttachmentPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomAttachmentPicker.swift; sourceTree = "<group>"; };
|
||||||
12B09A94C519227264A41208 /* RoomMembershipDetailsProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembershipDetailsProxy.swift; sourceTree = "<group>"; };
|
12B09A94C519227264A41208 /* RoomMembershipDetailsProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembershipDetailsProxy.swift; sourceTree = "<group>"; };
|
||||||
12FD5280AF55AB7F50F8E47D /* preview_avatar_room.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = preview_avatar_room.jpg; sourceTree = "<group>"; };
|
12FD5280AF55AB7F50F8E47D /* preview_avatar_room.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = preview_avatar_room.jpg; sourceTree = "<group>"; };
|
||||||
1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; path = IntegrationTests.xctestplan; sourceTree = "<group>"; };
|
1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = IntegrationTests.xctestplan; sourceTree = "<group>"; };
|
||||||
130ED565A078F7E0B59D9D25 /* UNTextInputNotificationResponse+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNTextInputNotificationResponse+Creator.swift"; sourceTree = "<group>"; };
|
130ED565A078F7E0B59D9D25 /* UNTextInputNotificationResponse+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNTextInputNotificationResponse+Creator.swift"; sourceTree = "<group>"; };
|
||||||
136F80A613B55BDD071DCEA5 /* JoinRoomScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinRoomScreenModels.swift; sourceTree = "<group>"; };
|
136F80A613B55BDD071DCEA5 /* JoinRoomScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinRoomScreenModels.swift; sourceTree = "<group>"; };
|
||||||
13802897C7AFA360EA74C0B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
13802897C7AFA360EA74C0B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||||
@@ -1530,7 +1530,7 @@
|
|||||||
25F7FE40EF7490A7E09D7BE6 /* NotificationItemProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationItemProxy.swift; sourceTree = "<group>"; };
|
25F7FE40EF7490A7E09D7BE6 /* NotificationItemProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationItemProxy.swift; sourceTree = "<group>"; };
|
||||||
25F8664F1FB95AF3C4202478 /* PollFormScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollFormScreenCoordinator.swift; sourceTree = "<group>"; };
|
25F8664F1FB95AF3C4202478 /* PollFormScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollFormScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||||
260004737C573A56FA01E86E /* Encodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Encodable.swift; sourceTree = "<group>"; };
|
260004737C573A56FA01E86E /* Encodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Encodable.swift; sourceTree = "<group>"; };
|
||||||
267BB1D5B08A9511F894CB57 /* PreviewTests.xctestplan */ = {isa = PBXFileReference; path = PreviewTests.xctestplan; sourceTree = "<group>"; };
|
267BB1D5B08A9511F894CB57 /* PreviewTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = PreviewTests.xctestplan; sourceTree = "<group>"; };
|
||||||
26B0A96B8FE4849227945067 /* VoiceMessageRecorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageRecorder.swift; sourceTree = "<group>"; };
|
26B0A96B8FE4849227945067 /* VoiceMessageRecorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageRecorder.swift; sourceTree = "<group>"; };
|
||||||
26EAAB54C6CE91D64B69A9F8 /* AppLockServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockServiceProtocol.swift; sourceTree = "<group>"; };
|
26EAAB54C6CE91D64B69A9F8 /* AppLockServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockServiceProtocol.swift; sourceTree = "<group>"; };
|
||||||
2711E5996016ABD6EAAEB58A /* LogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogLevel.swift; sourceTree = "<group>"; };
|
2711E5996016ABD6EAAEB58A /* LogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogLevel.swift; sourceTree = "<group>"; };
|
||||||
@@ -1604,7 +1604,7 @@
|
|||||||
3558A15CFB934F9229301527 /* RestorationToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestorationToken.swift; sourceTree = "<group>"; };
|
3558A15CFB934F9229301527 /* RestorationToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestorationToken.swift; sourceTree = "<group>"; };
|
||||||
35AFCF4C05DEED04E3DB1A16 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
35AFCF4C05DEED04E3DB1A16 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
35FA991289149D31F4286747 /* UserPreference.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPreference.swift; sourceTree = "<group>"; };
|
35FA991289149D31F4286747 /* UserPreference.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPreference.swift; sourceTree = "<group>"; };
|
||||||
36DA824791172B9821EACBED /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
36DA824791172B9821EACBED /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||||
36FD673E24FBFCFDF398716A /* RoomMemberProxyMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMemberProxyMock.swift; sourceTree = "<group>"; };
|
36FD673E24FBFCFDF398716A /* RoomMemberProxyMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMemberProxyMock.swift; sourceTree = "<group>"; };
|
||||||
371B248460BD1A3F20318137 /* TimelineProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProvider.swift; sourceTree = "<group>"; };
|
371B248460BD1A3F20318137 /* TimelineProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProvider.swift; sourceTree = "<group>"; };
|
||||||
376D941BF8BB294389C0DE24 /* MapTilerURLBuildersTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTilerURLBuildersTests.swift; sourceTree = "<group>"; };
|
376D941BF8BB294389C0DE24 /* MapTilerURLBuildersTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTilerURLBuildersTests.swift; sourceTree = "<group>"; };
|
||||||
@@ -1721,7 +1721,7 @@
|
|||||||
4B41FABA2B0AEF4389986495 /* LoginMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginMode.swift; sourceTree = "<group>"; };
|
4B41FABA2B0AEF4389986495 /* LoginMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginMode.swift; sourceTree = "<group>"; };
|
||||||
4BD371B60E07A5324B9507EF /* AnalyticsSettingsScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsSettingsScreenCoordinator.swift; sourceTree = "<group>"; };
|
4BD371B60E07A5324B9507EF /* AnalyticsSettingsScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsSettingsScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||||
4C8D988E82A8DFA13BE46F7C /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = pl; path = pl.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
4C8D988E82A8DFA13BE46F7C /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = pl; path = pl.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||||
4CD6AC7546E8D7E5C73CEA48 /* ElementX.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = ElementX.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
4CD6AC7546E8D7E5C73CEA48 /* ElementX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ElementX.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
4CDDDDD9FE1A699D23A5E096 /* LoginScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginScreen.swift; sourceTree = "<group>"; };
|
4CDDDDD9FE1A699D23A5E096 /* LoginScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginScreen.swift; sourceTree = "<group>"; };
|
||||||
4D3A7375AB22721C436EB056 /* ComposerToolbarModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerToolbarModels.swift; sourceTree = "<group>"; };
|
4D3A7375AB22721C436EB056 /* ComposerToolbarModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerToolbarModels.swift; sourceTree = "<group>"; };
|
||||||
4E2245243369B99216C7D84E /* ImageCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCache.swift; sourceTree = "<group>"; };
|
4E2245243369B99216C7D84E /* ImageCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCache.swift; sourceTree = "<group>"; };
|
||||||
@@ -2008,7 +2008,7 @@
|
|||||||
8D55702474F279D910D2D162 /* RoomStateEventStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilder.swift; sourceTree = "<group>"; };
|
8D55702474F279D910D2D162 /* RoomStateEventStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilder.swift; sourceTree = "<group>"; };
|
||||||
8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
|
8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
8DA1E8F287680C8ED25EDBAC /* NetworkMonitorMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkMonitorMock.swift; sourceTree = "<group>"; };
|
8DA1E8F287680C8ED25EDBAC /* NetworkMonitorMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkMonitorMock.swift; sourceTree = "<group>"; };
|
||||||
8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; path = UITests.xctestplan; sourceTree = "<group>"; };
|
8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UITests.xctestplan; sourceTree = "<group>"; };
|
||||||
8E1584F8BCF407BB94F48F04 /* EncryptionResetPasswordScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionResetPasswordScreen.swift; sourceTree = "<group>"; };
|
8E1584F8BCF407BB94F48F04 /* EncryptionResetPasswordScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionResetPasswordScreen.swift; sourceTree = "<group>"; };
|
||||||
8EAF4A49F3ACD8BB8B0D2371 /* ClientSDKMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientSDKMock.swift; sourceTree = "<group>"; };
|
8EAF4A49F3ACD8BB8B0D2371 /* ClientSDKMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientSDKMock.swift; sourceTree = "<group>"; };
|
||||||
8F062DD2CCD95DC33528A16F /* KnockRequestProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KnockRequestProxy.swift; sourceTree = "<group>"; };
|
8F062DD2CCD95DC33528A16F /* KnockRequestProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KnockRequestProxy.swift; sourceTree = "<group>"; };
|
||||||
@@ -2200,7 +2200,7 @@
|
|||||||
B50F03079F6B5EF9CA005F14 /* TimelineProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProxyProtocol.swift; sourceTree = "<group>"; };
|
B50F03079F6B5EF9CA005F14 /* TimelineProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProxyProtocol.swift; sourceTree = "<group>"; };
|
||||||
B53AC78E49A297AC1D72A7CF /* AppMediator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppMediator.swift; sourceTree = "<group>"; };
|
B53AC78E49A297AC1D72A7CF /* AppMediator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppMediator.swift; sourceTree = "<group>"; };
|
||||||
B590BD4507D4F0A377FDE01A /* LoadableAvatarImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadableAvatarImage.swift; sourceTree = "<group>"; };
|
B590BD4507D4F0A377FDE01A /* LoadableAvatarImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadableAvatarImage.swift; sourceTree = "<group>"; };
|
||||||
B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; path = ConfettiScene.scn; sourceTree = "<group>"; };
|
B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = ConfettiScene.scn; sourceTree = "<group>"; };
|
||||||
B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreenViewModel.swift; sourceTree = "<group>"; };
|
B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreenViewModel.swift; sourceTree = "<group>"; };
|
||||||
B6404166CBF5CC88673FF9E2 /* RoomDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetails.swift; sourceTree = "<group>"; };
|
B6404166CBF5CC88673FF9E2 /* RoomDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetails.swift; sourceTree = "<group>"; };
|
||||||
B655A536341D2695158C6664 /* AuthenticationClientBuilderFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationClientBuilderFactory.swift; sourceTree = "<group>"; };
|
B655A536341D2695158C6664 /* AuthenticationClientBuilderFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationClientBuilderFactory.swift; sourceTree = "<group>"; };
|
||||||
@@ -2227,7 +2227,7 @@
|
|||||||
BA40B98B098B6F0371B750B3 /* TemplateScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateScreenModels.swift; sourceTree = "<group>"; };
|
BA40B98B098B6F0371B750B3 /* TemplateScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateScreenModels.swift; sourceTree = "<group>"; };
|
||||||
BA919F521E9F0EE3638AFC85 /* BugReportScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BugReportScreen.swift; sourceTree = "<group>"; };
|
BA919F521E9F0EE3638AFC85 /* BugReportScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BugReportScreen.swift; sourceTree = "<group>"; };
|
||||||
BB284643AF7AB131E307DCE0 /* AudioSessionProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioSessionProtocol.swift; sourceTree = "<group>"; };
|
BB284643AF7AB131E307DCE0 /* AudioSessionProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioSessionProtocol.swift; sourceTree = "<group>"; };
|
||||||
BB576F4118C35E6B5124FA22 /* test_apple_image.heic */ = {isa = PBXFileReference; path = test_apple_image.heic; sourceTree = "<group>"; };
|
BB576F4118C35E6B5124FA22 /* test_apple_image.heic */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_apple_image.heic; sourceTree = "<group>"; };
|
||||||
BB5B00A014307CE37B2812CD /* TimelineViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineViewModelProtocol.swift; sourceTree = "<group>"; };
|
BB5B00A014307CE37B2812CD /* TimelineViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||||
BB8BC4C791D0E88CFCF4E5DF /* ServerSelectionScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionScreenCoordinator.swift; sourceTree = "<group>"; };
|
BB8BC4C791D0E88CFCF4E5DF /* ServerSelectionScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||||
BBEC57C204D77908E355EF42 /* AudioRecorderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioRecorderProtocol.swift; sourceTree = "<group>"; };
|
BBEC57C204D77908E355EF42 /* AudioRecorderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioRecorderProtocol.swift; sourceTree = "<group>"; };
|
||||||
@@ -2325,7 +2325,7 @@
|
|||||||
CDB3227C7A74B734924942E9 /* RoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProvider.swift; sourceTree = "<group>"; };
|
CDB3227C7A74B734924942E9 /* RoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProvider.swift; sourceTree = "<group>"; };
|
||||||
CDE3F3911FF7CC639BDE5844 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
|
CDE3F3911FF7CC639BDE5844 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
CEE20623EB4A9B88FB29F2BA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SAS.strings; sourceTree = "<group>"; };
|
CEE20623EB4A9B88FB29F2BA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SAS.strings; sourceTree = "<group>"; };
|
||||||
CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; path = UnitTests.xctestplan; sourceTree = "<group>"; };
|
CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = "<group>"; };
|
||||||
D01FD1171FF40E34D707FD00 /* BigIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BigIcon.swift; sourceTree = "<group>"; };
|
D01FD1171FF40E34D707FD00 /* BigIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BigIcon.swift; sourceTree = "<group>"; };
|
||||||
D046ABB22E680F7C5054441B /* SecurityAndPrivacyScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecurityAndPrivacyScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
D046ABB22E680F7C5054441B /* SecurityAndPrivacyScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecurityAndPrivacyScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||||
D071F86CD47582B9196C9D16 /* UserDiscoverySection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoverySection.swift; sourceTree = "<group>"; };
|
D071F86CD47582B9196C9D16 /* UserDiscoverySection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoverySection.swift; sourceTree = "<group>"; };
|
||||||
@@ -2380,7 +2380,7 @@
|
|||||||
DC0AEA686E425F86F6BA0404 /* UNNotification+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNNotification+Creator.swift"; sourceTree = "<group>"; };
|
DC0AEA686E425F86F6BA0404 /* UNNotification+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNNotification+Creator.swift"; sourceTree = "<group>"; };
|
||||||
DC10CCC8D68B863E20660DBC /* MessageForwardingScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageForwardingScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
DC10CCC8D68B863E20660DBC /* MessageForwardingScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageForwardingScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||||
DC528B3764E3CF7FCFEF40E7 /* PollInteractionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollInteractionHandler.swift; sourceTree = "<group>"; };
|
DC528B3764E3CF7FCFEF40E7 /* PollInteractionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollInteractionHandler.swift; sourceTree = "<group>"; };
|
||||||
DCA2D836BD10303F37FAAEED /* test_voice_message.m4a */ = {isa = PBXFileReference; path = test_voice_message.m4a; sourceTree = "<group>"; };
|
DCA2D836BD10303F37FAAEED /* test_voice_message.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_voice_message.m4a; sourceTree = "<group>"; };
|
||||||
DCAC01A97A43BE07B9E94E43 /* ShareExtensionModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareExtensionModels.swift; sourceTree = "<group>"; };
|
DCAC01A97A43BE07B9E94E43 /* ShareExtensionModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareExtensionModels.swift; sourceTree = "<group>"; };
|
||||||
DCF239C619971FDE48132550 /* SecureBackupLogoutConfirmationScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupLogoutConfirmationScreenModels.swift; sourceTree = "<group>"; };
|
DCF239C619971FDE48132550 /* SecureBackupLogoutConfirmationScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupLogoutConfirmationScreenModels.swift; sourceTree = "<group>"; };
|
||||||
DD8C9BBB729C941BEE0E2A63 /* TimelineProviderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProviderProtocol.swift; sourceTree = "<group>"; };
|
DD8C9BBB729C941BEE0E2A63 /* TimelineProviderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProviderProtocol.swift; sourceTree = "<group>"; };
|
||||||
@@ -2420,7 +2420,7 @@
|
|||||||
E5272BC4A60B6AD7553BACA1 /* BlurHashDecode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlurHashDecode.swift; sourceTree = "<group>"; };
|
E5272BC4A60B6AD7553BACA1 /* BlurHashDecode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlurHashDecode.swift; sourceTree = "<group>"; };
|
||||||
E53BFB7E4F329621C844E8C3 /* AnalyticsPromptScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreen.swift; sourceTree = "<group>"; };
|
E53BFB7E4F329621C844E8C3 /* AnalyticsPromptScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreen.swift; sourceTree = "<group>"; };
|
||||||
E55B5EA766E89FF1F87C3ACB /* RoomNotificationSettingsProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsProxyProtocol.swift; sourceTree = "<group>"; };
|
E55B5EA766E89FF1F87C3ACB /* RoomNotificationSettingsProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsProxyProtocol.swift; sourceTree = "<group>"; };
|
||||||
E5E7D4EE7CA295E5039FDA21 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; path = portrait_test_video.mp4; sourceTree = "<group>"; };
|
E5E7D4EE7CA295E5039FDA21 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = portrait_test_video.mp4; sourceTree = "<group>"; };
|
||||||
E5E94DCFEE803E5ABAE8ACCE /* KeychainControllerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainControllerProtocol.swift; sourceTree = "<group>"; };
|
E5E94DCFEE803E5ABAE8ACCE /* KeychainControllerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainControllerProtocol.swift; sourceTree = "<group>"; };
|
||||||
E5F2B6443D1ED8602F328539 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ru; path = ru.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
E5F2B6443D1ED8602F328539 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ru; path = ru.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||||
E5FDFAA04174CC99FB66391C /* EditRoomAddressScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditRoomAddressScreenViewModel.swift; sourceTree = "<group>"; };
|
E5FDFAA04174CC99FB66391C /* EditRoomAddressScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditRoomAddressScreenViewModel.swift; sourceTree = "<group>"; };
|
||||||
@@ -2464,7 +2464,7 @@
|
|||||||
ED0CBEAB5F796BEFBAF7BB6A /* VideoRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineView.swift; sourceTree = "<group>"; };
|
ED0CBEAB5F796BEFBAF7BB6A /* VideoRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||||
ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = "<group>"; };
|
ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = "<group>"; };
|
||||||
ED33988DA4FD4FC666800106 /* SessionVerificationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionVerificationScreenViewModel.swift; sourceTree = "<group>"; };
|
ED33988DA4FD4FC666800106 /* SessionVerificationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionVerificationScreenViewModel.swift; sourceTree = "<group>"; };
|
||||||
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; path = message.caf; sourceTree = "<group>"; };
|
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = message.caf; sourceTree = "<group>"; };
|
||||||
ED49073BB1C1FC649DAC2CCD /* LocationRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationRoomTimelineView.swift; sourceTree = "<group>"; };
|
ED49073BB1C1FC649DAC2CCD /* LocationRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||||
ED60E4D2CD678E1EBF16F77A /* BlockedUsersScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockedUsersScreen.swift; sourceTree = "<group>"; };
|
ED60E4D2CD678E1EBF16F77A /* BlockedUsersScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockedUsersScreen.swift; sourceTree = "<group>"; };
|
||||||
EE378083653EF0C9B5E9D580 /* EmoteRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItemContent.swift; sourceTree = "<group>"; };
|
EE378083653EF0C9B5E9D580 /* EmoteRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItemContent.swift; sourceTree = "<group>"; };
|
||||||
@@ -7919,9 +7919,7 @@
|
|||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
||||||
OTHER_SWIFT_FLAGS = (
|
OTHER_SWIFT_FLAGS = "-DIS_NSE";
|
||||||
"-DIS_NSE",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse";
|
PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse";
|
||||||
PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)";
|
PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)";
|
||||||
PRODUCT_NAME = NSE;
|
PRODUCT_NAME = NSE;
|
||||||
@@ -7971,9 +7969,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
||||||
OTHER_SWIFT_FLAGS = (
|
OTHER_SWIFT_FLAGS = "-DIS_MAIN_APP";
|
||||||
"-DIS_MAIN_APP",
|
|
||||||
);
|
|
||||||
PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills";
|
PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
|
||||||
PRODUCT_NAME = "$(APP_NAME)";
|
PRODUCT_NAME = "$(APP_NAME)";
|
||||||
@@ -8000,9 +7996,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
||||||
OTHER_SWIFT_FLAGS = (
|
OTHER_SWIFT_FLAGS = "-DIS_MAIN_APP";
|
||||||
"-DIS_MAIN_APP",
|
|
||||||
);
|
|
||||||
PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills";
|
PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
|
||||||
PRODUCT_NAME = "$(APP_NAME)";
|
PRODUCT_NAME = "$(APP_NAME)";
|
||||||
@@ -8268,9 +8262,7 @@
|
|||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
MARKETING_VERSION = "$(MARKETING_VERSION)";
|
||||||
OTHER_SWIFT_FLAGS = (
|
OTHER_SWIFT_FLAGS = "-DIS_NSE";
|
||||||
"-DIS_NSE",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse";
|
PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse";
|
||||||
PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)";
|
PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)";
|
||||||
PRODUCT_NAME = NSE;
|
PRODUCT_NAME = NSE;
|
||||||
|
|||||||
@@ -13393,6 +13393,70 @@ class RoomPreviewProxyMock: RoomPreviewProxyProtocol, @unchecked Sendable {
|
|||||||
var underlyingOwnMembershipDetails: RoomMembershipDetailsProxyProtocol?
|
var underlyingOwnMembershipDetails: RoomMembershipDetailsProxyProtocol?
|
||||||
var ownMembershipDetailsClosure: (() async -> RoomMembershipDetailsProxyProtocol?)?
|
var ownMembershipDetailsClosure: (() async -> RoomMembershipDetailsProxyProtocol?)?
|
||||||
|
|
||||||
|
//MARK: - forgetRoom
|
||||||
|
|
||||||
|
var forgetRoomUnderlyingCallsCount = 0
|
||||||
|
var forgetRoomCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return forgetRoomUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = forgetRoomUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
forgetRoomUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
forgetRoomUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var forgetRoomCalled: Bool {
|
||||||
|
return forgetRoomCallsCount > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
var forgetRoomUnderlyingReturnValue: Result<Void, RoomProxyError>!
|
||||||
|
var forgetRoomReturnValue: Result<Void, RoomProxyError>! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return forgetRoomUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: Result<Void, RoomProxyError>? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = forgetRoomUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
forgetRoomUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
forgetRoomUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var forgetRoomClosure: (() async -> Result<Void, RoomProxyError>)?
|
||||||
|
|
||||||
|
func forgetRoom() async -> Result<Void, RoomProxyError> {
|
||||||
|
forgetRoomCallsCount += 1
|
||||||
|
if let forgetRoomClosure = forgetRoomClosure {
|
||||||
|
return await forgetRoomClosure()
|
||||||
|
} else {
|
||||||
|
return forgetRoomReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
class RoomProxyMock: RoomProxyProtocol, @unchecked Sendable {
|
class RoomProxyMock: RoomProxyProtocol, @unchecked Sendable {
|
||||||
var id: String {
|
var id: String {
|
||||||
|
|||||||
@@ -11429,6 +11429,46 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
|
|||||||
enableSendQueueEnableClosure?(enable)
|
enableSendQueueEnableClosure?(enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - forget
|
||||||
|
|
||||||
|
open var forgetThrowableError: Error?
|
||||||
|
var forgetUnderlyingCallsCount = 0
|
||||||
|
open var forgetCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return forgetUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = forgetUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
forgetUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
forgetUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var forgetCalled: Bool {
|
||||||
|
return forgetCallsCount > 0
|
||||||
|
}
|
||||||
|
open var forgetClosure: (() async throws -> Void)?
|
||||||
|
|
||||||
|
open override func forget() async throws {
|
||||||
|
if let error = forgetThrowableError {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
forgetCallsCount += 1
|
||||||
|
try await forgetClosure?()
|
||||||
|
}
|
||||||
|
|
||||||
//MARK: - getPowerLevels
|
//MARK: - getPowerLevels
|
||||||
|
|
||||||
open var getPowerLevelsThrowableError: Error?
|
open var getPowerLevelsThrowableError: Error?
|
||||||
@@ -19421,6 +19461,71 @@ open class SyncServiceBuilderSDKMock: MatrixRustSDK.SyncServiceBuilder, @uncheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MARK: - withOfflineMode
|
||||||
|
|
||||||
|
var withOfflineModeUnderlyingCallsCount = 0
|
||||||
|
open var withOfflineModeCallsCount: Int {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return withOfflineModeUnderlyingCallsCount
|
||||||
|
} else {
|
||||||
|
var returnValue: Int? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = withOfflineModeUnderlyingCallsCount
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
withOfflineModeUnderlyingCallsCount = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
withOfflineModeUnderlyingCallsCount = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var withOfflineModeCalled: Bool {
|
||||||
|
return withOfflineModeCallsCount > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
var withOfflineModeUnderlyingReturnValue: SyncServiceBuilder!
|
||||||
|
open var withOfflineModeReturnValue: SyncServiceBuilder! {
|
||||||
|
get {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
return withOfflineModeUnderlyingReturnValue
|
||||||
|
} else {
|
||||||
|
var returnValue: SyncServiceBuilder? = nil
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
returnValue = withOfflineModeUnderlyingReturnValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnValue!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if Thread.isMainThread {
|
||||||
|
withOfflineModeUnderlyingReturnValue = newValue
|
||||||
|
} else {
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
withOfflineModeUnderlyingReturnValue = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open var withOfflineModeClosure: (() -> SyncServiceBuilder)?
|
||||||
|
|
||||||
|
open override func withOfflineMode() -> SyncServiceBuilder {
|
||||||
|
withOfflineModeCallsCount += 1
|
||||||
|
if let withOfflineModeClosure = withOfflineModeClosure {
|
||||||
|
return withOfflineModeClosure()
|
||||||
|
} else {
|
||||||
|
return withOfflineModeReturnValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//MARK: - withUtdHook
|
//MARK: - withUtdHook
|
||||||
|
|
||||||
var withUtdHookDelegateUnderlyingCallsCount = 0
|
var withUtdHookDelegateUnderlyingCallsCount = 0
|
||||||
|
|||||||
@@ -13,13 +13,14 @@ extension RoomPreviewProxyMock {
|
|||||||
var roomID = "1"
|
var roomID = "1"
|
||||||
var canonicalAlias = "#3🌞problem:matrix.org"
|
var canonicalAlias = "#3🌞problem:matrix.org"
|
||||||
var name = "The Three-Body Problem - 三体"
|
var name = "The Three-Body Problem - 三体"
|
||||||
var topic = "“Science and technology were the only keys to opening the door to the future, and people approached science with the faith and sincerity of elementary school students.”"
|
var topic: String? = "“Science and technology were the only keys to opening the door to the future, and people approached science with the faith and sincerity of elementary school students.”"
|
||||||
var avatarURL = URL.mockMXCAvatar.absoluteString
|
var avatarURL = URL.mockMXCAvatar.absoluteString
|
||||||
var numJoinedMembers = UInt64(100)
|
var numJoinedMembers = UInt64(100)
|
||||||
var numActiveMembers = UInt64(100)
|
var numActiveMembers = UInt64(100)
|
||||||
var roomType = RoomType.room
|
var roomType = RoomType.room
|
||||||
var membership: Membership?
|
var membership: Membership?
|
||||||
var joinRule: JoinRule
|
var joinRule: JoinRule
|
||||||
|
var isDirect = false
|
||||||
}
|
}
|
||||||
|
|
||||||
static var joinable: RoomPreviewProxyMock {
|
static var joinable: RoomPreviewProxyMock {
|
||||||
@@ -42,6 +43,14 @@ extension RoomPreviewProxyMock {
|
|||||||
return .init(.init(membership: .invited, joinRule: .invite))
|
return .init(.init(membership: .invited, joinRule: .invite))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static func inviteDM(roomID: String? = nil) -> RoomPreviewProxyMock {
|
||||||
|
if let roomID {
|
||||||
|
return .init(.init(roomID: roomID, topic: nil, numJoinedMembers: 1, membership: .invited, joinRule: .invite, isDirect: true))
|
||||||
|
}
|
||||||
|
|
||||||
|
return .init(.init(topic: nil, numJoinedMembers: 1, membership: .invited, joinRule: .invite, isDirect: true))
|
||||||
|
}
|
||||||
|
|
||||||
static var knockable: RoomPreviewProxyMock {
|
static var knockable: RoomPreviewProxyMock {
|
||||||
.init(.init(membership: nil, joinRule: .knock))
|
.init(.init(membership: nil, joinRule: .knock))
|
||||||
}
|
}
|
||||||
@@ -71,7 +80,7 @@ extension RoomPreviewProxyMock {
|
|||||||
isHistoryWorldReadable: nil,
|
isHistoryWorldReadable: nil,
|
||||||
membership: configuration.membership,
|
membership: configuration.membership,
|
||||||
joinRule: configuration.joinRule,
|
joinRule: configuration.joinRule,
|
||||||
isDirect: nil,
|
isDirect: configuration.isDirect,
|
||||||
heroes: nil))
|
heroes: nil))
|
||||||
|
|
||||||
let roomMembershipDetails = RoomMembershipDetailsProxyMock()
|
let roomMembershipDetails = RoomMembershipDetailsProxyMock()
|
||||||
|
|||||||
@@ -18,19 +18,21 @@ enum JoinRoomScreenMode: Equatable {
|
|||||||
case joinable
|
case joinable
|
||||||
case restricted
|
case restricted
|
||||||
case inviteRequired
|
case inviteRequired
|
||||||
case invited
|
case invited(isDM: Bool)
|
||||||
case knockable
|
case knockable
|
||||||
case knocked
|
case knocked
|
||||||
case banned(sender: String?, reason: String?)
|
case banned(sender: String?, reason: String?)
|
||||||
|
case forbidden
|
||||||
}
|
}
|
||||||
|
|
||||||
struct JoinRoomScreenRoomDetails {
|
struct JoinRoomScreenRoomDetails {
|
||||||
let name: String?
|
let name: String?
|
||||||
let topic: String?
|
let topic: String?
|
||||||
let canonicalAlias: String?
|
let canonicalAlias: String?
|
||||||
let avatar: RoomAvatar
|
let avatar: RoomAvatar?
|
||||||
let memberCount: Int
|
let memberCount: Int?
|
||||||
let inviter: RoomInviterDetails?
|
let inviter: RoomInviterDetails?
|
||||||
|
let isDirect: Bool?
|
||||||
}
|
}
|
||||||
|
|
||||||
struct JoinRoomScreenViewState: BindableState {
|
struct JoinRoomScreenViewState: BindableState {
|
||||||
@@ -39,28 +41,45 @@ struct JoinRoomScreenViewState: BindableState {
|
|||||||
var roomDetails: JoinRoomScreenRoomDetails?
|
var roomDetails: JoinRoomScreenRoomDetails?
|
||||||
|
|
||||||
var mode: JoinRoomScreenMode = .loading
|
var mode: JoinRoomScreenMode = .loading
|
||||||
|
|
||||||
var bindings = JoinRoomScreenViewStateBindings()
|
var bindings = JoinRoomScreenViewStateBindings()
|
||||||
|
|
||||||
var title: String {
|
var title: String {
|
||||||
roomDetails?.name ?? L10n.screenJoinRoomTitleNoPreview
|
if isDMInvite, let inviter = roomDetails?.inviter {
|
||||||
|
return inviter.displayName ?? inviter.id
|
||||||
|
} else {
|
||||||
|
return roomDetails?.name ?? L10n.screenJoinRoomTitleNoPreview
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var subtitle: String? {
|
var subtitle: String? {
|
||||||
switch mode {
|
switch mode {
|
||||||
case .loading:
|
case .invited(isDM: true):
|
||||||
nil
|
if let inviter = roomDetails?.inviter {
|
||||||
case .unknown:
|
return inviter.displayName != nil ? inviter.id : nil
|
||||||
L10n.screenJoinRoomSubtitleNoPreview
|
}
|
||||||
case .knocked:
|
return nil
|
||||||
nil
|
case .loading, .unknown, .knocked:
|
||||||
|
return nil
|
||||||
default:
|
default:
|
||||||
roomDetails?.canonicalAlias
|
return roomDetails?.canonicalAlias
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var avatar: RoomAvatar {
|
var avatar: RoomAvatar? {
|
||||||
roomDetails?.avatar ?? .room(id: roomID, name: title, avatarURL: nil)
|
if isDMInvite, let inviter = roomDetails?.inviter {
|
||||||
|
return .room(id: roomID, name: inviter.displayName, avatarURL: inviter.avatarURL)
|
||||||
|
} else if let avatar = roomDetails?.avatar {
|
||||||
|
return avatar
|
||||||
|
} else if let name = roomDetails?.name {
|
||||||
|
return .room(id: roomID, name: name, avatarURL: nil)
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var isDMInvite: Bool {
|
||||||
|
mode == .invited(isDM: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,4 +99,6 @@ enum JoinRoomScreenViewAction {
|
|||||||
case join
|
case join
|
||||||
case acceptInvite
|
case acceptInvite
|
||||||
case declineInvite
|
case declineInvite
|
||||||
|
case forget
|
||||||
|
case dismiss
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,10 +57,14 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
|||||||
Task { await joinRoom() }
|
Task { await joinRoom() }
|
||||||
case .acceptInvite:
|
case .acceptInvite:
|
||||||
Task { await joinRoom() }
|
Task { await joinRoom() }
|
||||||
|
case .forget:
|
||||||
|
Task { await forgetRoom() }
|
||||||
case .declineInvite:
|
case .declineInvite:
|
||||||
showDeclineInviteConfirmationAlert()
|
showDeclineInviteConfirmationAlert()
|
||||||
case .cancelKnock:
|
case .cancelKnock:
|
||||||
showCancelKnockConfirmationAlert()
|
showCancelKnockConfirmationAlert()
|
||||||
|
case .dismiss:
|
||||||
|
actionsSubject.send(.dismiss)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,12 +136,20 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
|||||||
}
|
}
|
||||||
|
|
||||||
let info = roomPreview?.info ?? roomInfo
|
let info = roomPreview?.info ?? roomInfo
|
||||||
|
let avatar: RoomAvatar? = if let avatar = info?.avatar {
|
||||||
|
avatar
|
||||||
|
} else if let displayName = info?.displayName {
|
||||||
|
.room(id: roomID, name: displayName, avatarURL: nil)
|
||||||
|
} else {
|
||||||
|
nil
|
||||||
|
}
|
||||||
state.roomDetails = JoinRoomScreenRoomDetails(name: info?.displayName,
|
state.roomDetails = JoinRoomScreenRoomDetails(name: info?.displayName,
|
||||||
topic: info?.topic,
|
topic: info?.topic,
|
||||||
canonicalAlias: info?.canonicalAlias,
|
canonicalAlias: info?.canonicalAlias,
|
||||||
avatar: info?.avatar ?? .room(id: roomID, name: info?.displayName ?? "", avatarURL: nil),
|
avatar: avatar,
|
||||||
memberCount: info?.joinedMembersCount ?? 0,
|
memberCount: info?.joinedMembersCount,
|
||||||
inviter: inviter)
|
inviter: inviter,
|
||||||
|
isDirect: info?.isDirect)
|
||||||
|
|
||||||
await updateMode()
|
await updateMode()
|
||||||
}
|
}
|
||||||
@@ -153,7 +165,7 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
|||||||
|
|
||||||
switch roomPreview.info.membership {
|
switch roomPreview.info.membership {
|
||||||
case .invited:
|
case .invited:
|
||||||
state.mode = .invited
|
state.mode = .invited(isDM: state.roomDetails?.isDirect == true && state.roomDetails?.memberCount == 1)
|
||||||
case .knocked:
|
case .knocked:
|
||||||
state.mode = .knocked
|
state.mode = .knocked
|
||||||
case .banned:
|
case .banned:
|
||||||
@@ -174,7 +186,7 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
|||||||
} else if let room {
|
} else if let room {
|
||||||
switch room {
|
switch room {
|
||||||
case .invited:
|
case .invited:
|
||||||
state.mode = .invited
|
state.mode = .invited(isDM: state.roomDetails?.isDirect == true && state.roomDetails?.memberCount == 1)
|
||||||
case .knocked:
|
case .knocked:
|
||||||
state.mode = .knocked
|
state.mode = .knocked
|
||||||
case .banned:
|
case .banned:
|
||||||
@@ -198,16 +210,26 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
|||||||
case .success:
|
case .success:
|
||||||
actionsSubject.send(.joined)
|
actionsSubject.send(.joined)
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
MXLog.error("Failed joining room alias: \(alias) with error: \(error)")
|
if case .forbiddenAccess = error {
|
||||||
userIndicatorController.submitIndicator(.init(title: L10n.errorUnknown))
|
MXLog.error("Failed joining room alias: \(alias) forbidden access")
|
||||||
|
state.mode = .forbidden
|
||||||
|
} else {
|
||||||
|
MXLog.error("Failed joining room alias: \(alias) with error: \(error)")
|
||||||
|
userIndicatorController.submitIndicator(.init(title: L10n.errorUnknown))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch await clientProxy.joinRoom(roomID, via: via) {
|
switch await clientProxy.joinRoom(roomID, via: via) {
|
||||||
case .success:
|
case .success:
|
||||||
actionsSubject.send(.joined)
|
actionsSubject.send(.joined)
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
MXLog.error("Failed joining room id: \(roomID) with error: \(error)")
|
if case .forbiddenAccess = error {
|
||||||
userIndicatorController.submitIndicator(.init(title: L10n.errorUnknown))
|
MXLog.error("Failed joining room id: \(roomID) forbidden access")
|
||||||
|
state.mode = .forbidden
|
||||||
|
} else {
|
||||||
|
MXLog.error("Failed joining room id: \(roomID) with error: \(error)")
|
||||||
|
userIndicatorController.submitIndicator(.init(title: L10n.errorUnknown))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -242,7 +264,7 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func showDeclineInviteConfirmationAlert() {
|
private func showDeclineInviteConfirmationAlert() {
|
||||||
guard let roomDetails = state.roomDetails else {
|
guard let roomDetails = state.roomDetails else {
|
||||||
userIndicatorController.submitIndicator(.init(title: L10n.errorUnknown))
|
userIndicatorController.submitIndicator(.init(title: L10n.errorUnknown))
|
||||||
@@ -307,6 +329,27 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func forgetRoom() async {
|
||||||
|
defer {
|
||||||
|
userIndicatorController.retractIndicatorWithId(roomID)
|
||||||
|
}
|
||||||
|
|
||||||
|
userIndicatorController.submitIndicator(UserIndicator(id: roomID, type: .modal, title: L10n.commonLoading, persistent: true))
|
||||||
|
|
||||||
|
guard case .banned = room, let roomPreview else {
|
||||||
|
userIndicatorController.submitIndicator(.init(title: L10n.errorUnknown))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let result = await roomPreview.forgetRoom()
|
||||||
|
|
||||||
|
if case .failure = result {
|
||||||
|
userIndicatorController.submitIndicator(.init(title: L10n.errorUnknown))
|
||||||
|
} else {
|
||||||
|
actionsSubject.send(.dismiss)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static let loadingIndicatorIdentifier = "\(JoinRoomScreenViewModel.self)-Loading"
|
private static let loadingIndicatorIdentifier = "\(JoinRoomScreenViewModel.self)-Loading"
|
||||||
|
|
||||||
private func showLoadingIndicator() {
|
private func showLoadingIndicator() {
|
||||||
|
|||||||
@@ -50,10 +50,18 @@ struct JoinRoomScreen: View {
|
|||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var defaultView: some View {
|
private var defaultView: some View {
|
||||||
VStack(spacing: 16) {
|
VStack(spacing: 16) {
|
||||||
RoomAvatarImage(avatar: context.viewState.avatar,
|
if let avatar = context.viewState.avatar {
|
||||||
avatarSize: .room(on: .joinRoom),
|
RoomAvatarImage(avatar: avatar,
|
||||||
mediaProvider: context.mediaProvider)
|
avatarSize: .room(on: .joinRoom),
|
||||||
.dynamicTypeSize(dynamicTypeSize < .accessibility1 ? dynamicTypeSize : .accessibility1)
|
mediaProvider: context.mediaProvider)
|
||||||
|
.dynamicTypeSize(dynamicTypeSize < .accessibility1 ? dynamicTypeSize : .accessibility1)
|
||||||
|
} else {
|
||||||
|
RoomAvatarImage(avatar: .room(id: "", name: nil, avatarURL: nil),
|
||||||
|
avatarSize: .room(on: .joinRoom),
|
||||||
|
mediaProvider: context.mediaProvider)
|
||||||
|
.dynamicTypeSize(dynamicTypeSize < .accessibility1 ? dynamicTypeSize : .accessibility1)
|
||||||
|
.hidden()
|
||||||
|
}
|
||||||
|
|
||||||
VStack(spacing: 8) {
|
VStack(spacing: 8) {
|
||||||
Text(context.viewState.title)
|
Text(context.viewState.title)
|
||||||
@@ -68,7 +76,7 @@ struct JoinRoomScreen: View {
|
|||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let memberCount = context.viewState.roomDetails?.memberCount {
|
if !context.viewState.isDMInvite, let memberCount = context.viewState.roomDetails?.memberCount {
|
||||||
BadgeLabel(title: "\(memberCount)", icon: \.userProfile, isHighlighted: false)
|
BadgeLabel(title: "\(memberCount)", icon: \.userProfile, isHighlighted: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,12 +182,31 @@ struct JoinRoomScreen: View {
|
|||||||
VStack(spacing: 16) { inviteButtons }
|
VStack(spacing: 16) { inviteButtons }
|
||||||
}
|
}
|
||||||
case .banned(let sender, let reason):
|
case .banned(let sender, let reason):
|
||||||
if let sender, let reason {
|
VStack(spacing: 24) {
|
||||||
bottomErrorMessage(title: L10n.screenJoinRoomBanByMessage(sender),
|
if let sender, let reason {
|
||||||
subtitle: L10n.screenJoinRoomBanReason(reason))
|
bottomErrorMessage(title: L10n.screenJoinRoomBanByMessage(sender),
|
||||||
} else {
|
subtitle: L10n.screenJoinRoomBanReason(reason))
|
||||||
bottomErrorMessage(title: L10n.screenJoinRoomBanMessage, subtitle: nil)
|
} else {
|
||||||
|
bottomErrorMessage(title: L10n.screenJoinRoomBanMessage, subtitle: nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button(L10n.screenJoinRoomForgetAction) {
|
||||||
|
context.send(viewAction: .forget)
|
||||||
|
}
|
||||||
|
.buttonStyle(.compound(.primary))
|
||||||
}
|
}
|
||||||
|
case .forbidden:
|
||||||
|
forbiddenView
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private var forbiddenView: some View {
|
||||||
|
VStack(spacing: 24) {
|
||||||
|
bottomErrorMessage(title: L10n.screenJoinRoomFailMessage, subtitle: L10n.screenJoinRoomFailReason)
|
||||||
|
Button(L10n.actionOk) {
|
||||||
|
context.send(viewAction: .dismiss)
|
||||||
|
}
|
||||||
|
.buttonStyle(.compound(.primary))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,9 +262,11 @@ struct JoinRoomScreen: View {
|
|||||||
private var toolbar: some ToolbarContent {
|
private var toolbar: some ToolbarContent {
|
||||||
if context.viewState.mode == .knocked {
|
if context.viewState.mode == .knocked {
|
||||||
ToolbarItem(placement: .principal) {
|
ToolbarItem(placement: .principal) {
|
||||||
RoomHeaderView(roomName: context.viewState.title,
|
if let avatar = context.viewState.avatar {
|
||||||
roomAvatar: context.viewState.avatar,
|
RoomHeaderView(roomName: context.viewState.title,
|
||||||
mediaProvider: context.mediaProvider)
|
roomAvatar: avatar,
|
||||||
|
mediaProvider: context.mediaProvider)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -250,30 +279,48 @@ struct JoinRoomScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
static let joinableViewModel = makeViewModel(mode: .joinable)
|
static let joinableViewModel = makeViewModel(mode: .joinable)
|
||||||
static let restrictedViewModel = makeViewModel(mode: .restricted)
|
static let restrictedViewModel = makeViewModel(mode: .restricted)
|
||||||
static let inviteRequiredViewModel = makeViewModel(mode: .inviteRequired)
|
static let inviteRequiredViewModel = makeViewModel(mode: .inviteRequired)
|
||||||
static let invitedViewModel = makeViewModel(mode: .invited)
|
static let invitedViewModel = makeViewModel(mode: .invited(isDM: false))
|
||||||
|
static let invitedDMViewModel = makeViewModel(mode: .invited(isDM: true))
|
||||||
static let knockableViewModel = makeViewModel(mode: .knockable)
|
static let knockableViewModel = makeViewModel(mode: .knockable)
|
||||||
static let knockedViewModel = makeViewModel(mode: .knocked)
|
static let knockedViewModel = makeViewModel(mode: .knocked)
|
||||||
static let bannedViewModel = makeViewModel(mode: .banned(sender: "Bob", reason: "Spamming"))
|
static let bannedViewModel = makeViewModel(mode: .banned(sender: "Bob", reason: "Spamming"))
|
||||||
|
static let forbiddenViewModel = makeViewModel(mode: .forbidden)
|
||||||
|
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
makePreview(viewModel: unknownViewModel, previewDisplayName: "Unknown")
|
makePreview(viewModel: unknownViewModel, mode: .unknown)
|
||||||
makePreview(viewModel: joinableViewModel, previewDisplayName: "Joinable")
|
makePreview(viewModel: joinableViewModel, mode: .joinable)
|
||||||
makePreview(viewModel: restrictedViewModel, previewDisplayName: "Restricted")
|
makePreview(viewModel: restrictedViewModel, mode: .restricted)
|
||||||
makePreview(viewModel: inviteRequiredViewModel, previewDisplayName: "InviteRequired")
|
makePreview(viewModel: inviteRequiredViewModel, mode: .inviteRequired)
|
||||||
makePreview(viewModel: invitedViewModel, previewDisplayName: "Invited")
|
makePreview(viewModel: invitedViewModel, mode: .invited(isDM: false))
|
||||||
makePreview(viewModel: knockableViewModel, previewDisplayName: "Knockable")
|
makePreview(viewModel: invitedDMViewModel, mode: .invited(isDM: true))
|
||||||
makePreview(viewModel: knockedViewModel, previewDisplayName: "Knocked")
|
makePreview(viewModel: knockableViewModel, mode: .knockable)
|
||||||
makePreview(viewModel: bannedViewModel, previewDisplayName: "Banned")
|
makePreview(viewModel: knockedViewModel, mode: .knocked)
|
||||||
|
makePreview(viewModel: bannedViewModel, mode: .banned(sender: nil, reason: nil))
|
||||||
|
makePreview(viewModel: forbiddenViewModel, mode: .forbidden)
|
||||||
}
|
}
|
||||||
|
|
||||||
static func makePreview(viewModel: JoinRoomScreenViewModel, previewDisplayName: String) -> some View {
|
@ViewBuilder
|
||||||
NavigationStack {
|
static func makePreview(viewModel: JoinRoomScreenViewModel, mode: JoinRoomScreenMode) -> some View {
|
||||||
JoinRoomScreen(context: viewModel.context)
|
if mode == .forbidden {
|
||||||
|
NavigationStack {
|
||||||
|
JoinRoomScreen(context: viewModel.context)
|
||||||
|
}
|
||||||
|
.snapshotPreferences(expect: viewModel.context.$viewState.map { state in
|
||||||
|
state.mode == .forbidden
|
||||||
|
})
|
||||||
|
.onAppear {
|
||||||
|
forbiddenViewModel.context.send(viewAction: .join)
|
||||||
|
}
|
||||||
|
.previewDisplayName(mode.previewDisplayName)
|
||||||
|
} else {
|
||||||
|
NavigationStack {
|
||||||
|
JoinRoomScreen(context: viewModel.context)
|
||||||
|
}
|
||||||
|
.snapshotPreferences(expect: viewModel.context.$viewState.map { state in
|
||||||
|
state.roomDetails != nil
|
||||||
|
})
|
||||||
|
.previewDisplayName(mode.previewDisplayName)
|
||||||
}
|
}
|
||||||
.snapshotPreferences(expect: viewModel.context.$viewState.map { state in
|
|
||||||
state.roomDetails != nil
|
|
||||||
})
|
|
||||||
.previewDisplayName(previewDisplayName)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static func makeViewModel(mode: JoinRoomScreenMode) -> JoinRoomScreenViewModel {
|
static func makeViewModel(mode: JoinRoomScreenMode) -> JoinRoomScreenViewModel {
|
||||||
@@ -294,10 +341,17 @@ struct JoinRoomScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
case .inviteRequired:
|
case .inviteRequired:
|
||||||
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.inviteRequired)
|
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.inviteRequired)
|
||||||
clientProxy.roomForIdentifierReturnValue = nil
|
clientProxy.roomForIdentifierReturnValue = nil
|
||||||
case .invited:
|
case .invited(let isDM):
|
||||||
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.invited())
|
if isDM {
|
||||||
clientProxy.roomForIdentifierClosure = { _ in
|
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.inviteDM())
|
||||||
.invited(InvitedRoomProxyMock(.init(avatarURL: .mockMXCAvatar)))
|
clientProxy.roomForIdentifierClosure = { _ in
|
||||||
|
.invited(InvitedRoomProxyMock(.init(avatarURL: .mockMXCAvatar)))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.invited())
|
||||||
|
clientProxy.roomForIdentifierClosure = { _ in
|
||||||
|
.invited(InvitedRoomProxyMock(.init(avatarURL: .mockMXCAvatar)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case .knockable:
|
case .knockable:
|
||||||
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.knockable)
|
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.knockable)
|
||||||
@@ -312,6 +366,12 @@ struct JoinRoomScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
clientProxy.roomForIdentifierClosure = { _ in
|
clientProxy.roomForIdentifierClosure = { _ in
|
||||||
.banned
|
.banned
|
||||||
}
|
}
|
||||||
|
case .forbidden:
|
||||||
|
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.restricted)
|
||||||
|
clientProxy.roomForIdentifierReturnValue = nil
|
||||||
|
clientProxy.joinRoomAliasClosure = { _ in
|
||||||
|
.failure(.forbiddenAccess)
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -324,3 +384,30 @@ struct JoinRoomScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extension JoinRoomScreenMode {
|
||||||
|
var previewDisplayName: String {
|
||||||
|
switch self {
|
||||||
|
case .unknown:
|
||||||
|
return "Unknown"
|
||||||
|
case .loading:
|
||||||
|
return "Loading"
|
||||||
|
case .joinable:
|
||||||
|
return "Joinable"
|
||||||
|
case .restricted:
|
||||||
|
return "Restricted"
|
||||||
|
case .inviteRequired:
|
||||||
|
return "InviteRequired"
|
||||||
|
case .invited(isDM: let isDM):
|
||||||
|
return isDM ? "InvitedDM" : "Invited"
|
||||||
|
case .knockable:
|
||||||
|
return "Knockable"
|
||||||
|
case .knocked:
|
||||||
|
return "Knocked"
|
||||||
|
case .banned:
|
||||||
|
return "Banned"
|
||||||
|
case .forbidden:
|
||||||
|
return "Forbidden"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -413,6 +413,9 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
await waitForRoomToSync(roomID: roomID, timeout: .seconds(30))
|
await waitForRoomToSync(roomID: roomID, timeout: .seconds(30))
|
||||||
|
|
||||||
return .success(())
|
return .success(())
|
||||||
|
} catch ClientError.MatrixApi(.forbidden, _, _) {
|
||||||
|
MXLog.error("Failed joining roomAlias: \(roomID) forbidden")
|
||||||
|
return .failure(.forbiddenAccess)
|
||||||
} catch {
|
} catch {
|
||||||
MXLog.error("Failed joining roomID: \(roomID) with error: \(error)")
|
MXLog.error("Failed joining roomID: \(roomID) with error: \(error)")
|
||||||
return .failure(.sdkError(error))
|
return .failure(.sdkError(error))
|
||||||
@@ -426,6 +429,9 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
await waitForRoomToSync(roomID: room.id(), timeout: .seconds(30))
|
await waitForRoomToSync(roomID: room.id(), timeout: .seconds(30))
|
||||||
|
|
||||||
return .success(())
|
return .success(())
|
||||||
|
} catch ClientError.MatrixApi(.forbidden, _, _) {
|
||||||
|
MXLog.error("Failed joining roomAlias: \(roomAlias) forbidden")
|
||||||
|
return .failure(.forbiddenAccess)
|
||||||
} catch {
|
} catch {
|
||||||
MXLog.error("Failed joining roomAlias: \(roomAlias) with error: \(error)")
|
MXLog.error("Failed joining roomAlias: \(roomAlias) with error: \(error)")
|
||||||
return .failure(.sdkError(error))
|
return .failure(.sdkError(error))
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ enum ClientProxyLoadingState {
|
|||||||
|
|
||||||
enum ClientProxyError: Error {
|
enum ClientProxyError: Error {
|
||||||
case sdkError(Error)
|
case sdkError(Error)
|
||||||
|
case forbiddenAccess
|
||||||
|
|
||||||
case invalidMedia
|
case invalidMedia
|
||||||
case invalidServerName
|
case invalidServerName
|
||||||
|
|||||||
@@ -32,4 +32,14 @@ final class RoomPreviewProxy: RoomPreviewProxyProtocol {
|
|||||||
senderRoomMember: senderRoomMember)
|
senderRoomMember: senderRoomMember)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func forgetRoom() async -> Result<Void, RoomProxyError> {
|
||||||
|
do {
|
||||||
|
try await roomPreview.forget()
|
||||||
|
return .success(())
|
||||||
|
} catch {
|
||||||
|
MXLog.error("Failed forgetting the room with error: \(error)")
|
||||||
|
return .failure(.sdkError(error))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,4 +11,7 @@ import Foundation
|
|||||||
protocol RoomPreviewProxyProtocol {
|
protocol RoomPreviewProxyProtocol {
|
||||||
var info: RoomPreviewInfoProxy { get }
|
var info: RoomPreviewInfoProxy { get }
|
||||||
var ownMembershipDetails: RoomMembershipDetailsProxyProtocol? { get async }
|
var ownMembershipDetails: RoomMembershipDetailsProxyProtocol? { get async }
|
||||||
|
|
||||||
|
/// Use this function to forget the room, should only be used if the current user membership is `banned`
|
||||||
|
func forgetRoom() async -> Result<Void, RoomProxyError>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ enum RoomProxyType {
|
|||||||
case joined(JoinedRoomProxyProtocol)
|
case joined(JoinedRoomProxyProtocol)
|
||||||
case invited(InvitedRoomProxyProtocol)
|
case invited(InvitedRoomProxyProtocol)
|
||||||
case knocked(KnockedRoomProxyProtocol)
|
case knocked(KnockedRoomProxyProtocol)
|
||||||
case left
|
|
||||||
case banned
|
case banned
|
||||||
|
case left
|
||||||
}
|
}
|
||||||
|
|
||||||
// sourcery: AutoMockable
|
// sourcery: AutoMockable
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:ed8e2b415bb4fac216f7e9949f736c2001b9bfc8aa112e6867e4c9419b16ba22
|
oid sha256:bef390e5063fc968023f3d7be436242923c42c22c5160ab91e9d9a941a726879
|
||||||
size 177624
|
size 185357
|
||||||
|
|||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0ddf683cd39f7ef235162eaf3ef56fd82385602fa8f9f3588238c73ea353238d
|
||||||
|
size 186602
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4db229e703bfee04b734129935f840398262952ea982a28b2b439f5cfe17cd1f
|
||||||
|
size 101098
|
||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:0f3662b03552af1d87d057db781d116590d37ea66803b13d5c727581c6510c58
|
oid sha256:dfc221af7a2bff00ab3107d7438cf0544bfe0b092d3c06174f067f54ac4beb78
|
||||||
size 123643
|
size 108616
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:6810a99b9515b741e07c200469e90067df19b3988fd961a3515496da22dc46bc
|
oid sha256:1f071d51fa158d743a97add7023b148aaffc3024db9dabacdb73c00f8624d22d
|
||||||
size 187166
|
size 195453
|
||||||
|
|||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8ce81edbe8762d0d67414c3d3673b1dee6638c91cd40f988edc1ce5f9d624964
|
||||||
|
size 199410
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4ccbab1cae4ddf3e4db0fd0847b8c43e0acea5b0f8da45f17ca3221ad1cf6fb2
|
||||||
|
size 105731
|
||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:8a4ed3ec9a4b6c75c2a071c7896295fb12dc320832274a71a6ad70734b85edad
|
oid sha256:296c8f2ad470843f69c3871e5ae0e2f064fbe3a29612a041319fe859d5f33f61
|
||||||
size 144830
|
size 121644
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:6d981af0fe2d6c26179627dc23ee23a8d1c2565d4214c770a440c1b1b63a1b0d
|
oid sha256:8ea4d0546bf12dbd0112d0d19caf1b31e4e11e76ce8a5a64a12345f6c9d083a2
|
||||||
size 124023
|
size 130402
|
||||||
|
|||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ba4bbbb005faa6b7375ad4cdf749df4bd0352e5ce80d480b13ff3ea6cf60a11d
|
||||||
|
size 130267
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6c2f73672d7ab3c76f3613abce2da6888b26457401d30720e90932cd084569cf
|
||||||
|
size 56394
|
||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:6b2b096f3f25e4207427a7112773126dc38b9596dd7bd4f1f2f2c6b60cea3472
|
oid sha256:7e6733dc72a1e261bfeeec1e037a7b38cbac6b131d939c65ee1a1168778a3375
|
||||||
size 80107
|
size 63367
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:0e80d687a41d05adf71953222cd746efce17bc6a24ad7b2ec2ec8304df24a8c4
|
oid sha256:3d1751f36575511b3e495f86f40a246c7a906bb3f7f400a3c7cc964e9a4df7ee
|
||||||
size 136385
|
size 144788
|
||||||
|
|||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6bd53c22bda3f296f085a7862f0d9b562e2a5d2ba95daed4d01bec5511a9dd53
|
||||||
|
size 148710
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0be9443668ec9caf1d88f1cdbabd05e2dd4eb156a2b3b58719d136912888bfc3
|
||||||
|
size 63892
|
||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:25e0625bdd58ec7e81991174fe1ef8e0e7a75bfddb41fd31bcfd03d514c3a1ef
|
oid sha256:c6dcfd41a3dd2b5e196844aec0d1e7902c260ad444daafcb6855267753793a29
|
||||||
size 109065
|
size 82604
|
||||||
|
|||||||
Reference in New Issue
Block a user