mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-09 16:22:55 +00:00
Removing dead code part 2 (#2235)
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
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 */
|
||||||
@@ -29,7 +29,6 @@
|
|||||||
02D8DF8EB7537EB4E9019DDB /* EventBasedTimelineItemProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 218AB05B4E3889731959C5F1 /* EventBasedTimelineItemProtocol.swift */; };
|
02D8DF8EB7537EB4E9019DDB /* EventBasedTimelineItemProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 218AB05B4E3889731959C5F1 /* EventBasedTimelineItemProtocol.swift */; };
|
||||||
02F4FAE40AF63A1941FD3BBA /* NotificationCenterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B7F8EE25775DE2A305CBB5 /* NotificationCenterProtocol.swift */; };
|
02F4FAE40AF63A1941FD3BBA /* NotificationCenterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B7F8EE25775DE2A305CBB5 /* NotificationCenterProtocol.swift */; };
|
||||||
037006FB6DF1374F94E4058D /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDCAC6CAAD65A2C24EA9C4B /* Dictionary.swift */; };
|
037006FB6DF1374F94E4058D /* Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDCAC6CAAD65A2C24EA9C4B /* Dictionary.swift */; };
|
||||||
03D684A3AE85A23B3DA3B43F /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = E26747B3154A5DBC3A7E24A5 /* Image.swift */; };
|
|
||||||
0437765FF480249486893CC7 /* ScreenTrackerViewModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 196004E7695FBA292A7944AF /* ScreenTrackerViewModifier.swift */; };
|
0437765FF480249486893CC7 /* ScreenTrackerViewModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 196004E7695FBA292A7944AF /* ScreenTrackerViewModifier.swift */; };
|
||||||
044DD8F80231BC30570F7965 /* UserDiscoveryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AAD845E53B0C8B5E0812C2 /* UserDiscoveryService.swift */; };
|
044DD8F80231BC30570F7965 /* UserDiscoveryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AAD845E53B0C8B5E0812C2 /* UserDiscoveryService.swift */; };
|
||||||
04778AA4D6AD2E153D7AAFF2 /* CallScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8866FE1CCCF10305FCACBC /* CallScreenUITests.swift */; };
|
04778AA4D6AD2E153D7AAFF2 /* CallScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8866FE1CCCF10305FCACBC /* CallScreenUITests.swift */; };
|
||||||
@@ -468,7 +467,6 @@
|
|||||||
7A0A0929556792FB19B812C5 /* SessionVerificationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84816E0D2F34E368BF64FA60 /* SessionVerificationScreen.swift */; };
|
7A0A0929556792FB19B812C5 /* SessionVerificationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84816E0D2F34E368BF64FA60 /* SessionVerificationScreen.swift */; };
|
||||||
7A642EE5F1ADC5D520F21924 /* MediaProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85EB16E7FE59A947CA441531 /* MediaProviderProtocol.swift */; };
|
7A642EE5F1ADC5D520F21924 /* MediaProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85EB16E7FE59A947CA441531 /* MediaProviderProtocol.swift */; };
|
||||||
7A71AEF419904209BB8C2833 /* UserAgentBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F2529D434C750ED78ADF1ED /* UserAgentBuilder.swift */; };
|
7A71AEF419904209BB8C2833 /* UserAgentBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F2529D434C750ED78ADF1ED /* UserAgentBuilder.swift */; };
|
||||||
7ABAB3A1D52B86FACF2F74CF /* MapTilerGeoCodingServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = C23B3FAD8B23C421BC0D1B1E /* MapTilerGeoCodingServiceProtocol.swift */; };
|
|
||||||
7AEC56ADEFC5A7198A17412F /* InviteUsersScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADB35E2DB4EFE8E6F3959629 /* InviteUsersScreenUITests.swift */; };
|
7AEC56ADEFC5A7198A17412F /* InviteUsersScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADB35E2DB4EFE8E6F3959629 /* InviteUsersScreenUITests.swift */; };
|
||||||
7B5DAB915357BE596529BF25 /* MapTilerStaticMapProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20872C3887F835958CE2F1D0 /* MapTilerStaticMapProtocol.swift */; };
|
7B5DAB915357BE596529BF25 /* MapTilerStaticMapProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20872C3887F835958CE2F1D0 /* MapTilerStaticMapProtocol.swift */; };
|
||||||
7BB31E67648CF32D2AB5E502 /* RoomScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CE3C90E487B255B735D73C8 /* RoomScreenViewModel.swift */; };
|
7BB31E67648CF32D2AB5E502 /* RoomScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CE3C90E487B255B735D73C8 /* RoomScreenViewModel.swift */; };
|
||||||
@@ -1052,7 +1050,7 @@
|
|||||||
033DB41C51865A2E83174E87 /* target.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = target.yml; sourceTree = "<group>"; };
|
033DB41C51865A2E83174E87 /* target.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = target.yml; sourceTree = "<group>"; };
|
||||||
035177BCD8E8308B098AC3C2 /* WindowManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowManager.swift; sourceTree = "<group>"; };
|
035177BCD8E8308B098AC3C2 /* WindowManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowManager.swift; sourceTree = "<group>"; };
|
||||||
0376C429FAB1687C3D905F3E /* MockCoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCoder.swift; sourceTree = "<group>"; };
|
0376C429FAB1687C3D905F3E /* MockCoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCoder.swift; sourceTree = "<group>"; };
|
||||||
0392E3FDE372C9B56FEEED8B /* test_voice_message.m4a */ = {isa = PBXFileReference; path = test_voice_message.m4a; sourceTree = "<group>"; };
|
0392E3FDE372C9B56FEEED8B /* test_voice_message.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_voice_message.m4a; sourceTree = "<group>"; };
|
||||||
03DD998E523D4EC93C7ED703 /* RoomNotificationSettingsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
03DD998E523D4EC93C7ED703 /* RoomNotificationSettingsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||||
03FABD73FD8086EFAB699F42 /* MediaUploadPreviewScreenViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaUploadPreviewScreenViewModelTests.swift; sourceTree = "<group>"; };
|
03FABD73FD8086EFAB699F42 /* MediaUploadPreviewScreenViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaUploadPreviewScreenViewModelTests.swift; sourceTree = "<group>"; };
|
||||||
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>"; };
|
||||||
@@ -1110,7 +1108,7 @@
|
|||||||
127C8472672A5BA09EF1ACF8 /* CurrentValuePublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrentValuePublisher.swift; sourceTree = "<group>"; };
|
127C8472672A5BA09EF1ACF8 /* CurrentValuePublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrentValuePublisher.swift; sourceTree = "<group>"; };
|
||||||
12EDAFB64FA5F6812D54F39A /* MigrationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigrationScreenViewModel.swift; sourceTree = "<group>"; };
|
12EDAFB64FA5F6812D54F39A /* MigrationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigrationScreenViewModel.swift; sourceTree = "<group>"; };
|
||||||
12F1E7F9C2BE8BB751037826 /* WaitlistScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenCoordinator.swift; sourceTree = "<group>"; };
|
12F1E7F9C2BE8BB751037826 /* WaitlistScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenCoordinator.swift; 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>"; };
|
||||||
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>"; };
|
||||||
1423AB065857FA546444DB15 /* NotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = "<group>"; };
|
1423AB065857FA546444DB15 /* NotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = "<group>"; };
|
||||||
@@ -1531,7 +1529,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>"; };
|
||||||
8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyle.swift; sourceTree = "<group>"; };
|
8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyle.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>"; };
|
||||||
8E1BBA73B611EDEEA6E20E05 /* InvitesScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvitesScreenModels.swift; sourceTree = "<group>"; };
|
8E1BBA73B611EDEEA6E20E05 /* InvitesScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvitesScreenModels.swift; sourceTree = "<group>"; };
|
||||||
8EC57A32ABC80D774CC663DB /* SettingsScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenUITests.swift; sourceTree = "<group>"; };
|
8EC57A32ABC80D774CC663DB /* SettingsScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenUITests.swift; sourceTree = "<group>"; };
|
||||||
8F21ED7205048668BEB44A38 /* AppActivityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppActivityView.swift; sourceTree = "<group>"; };
|
8F21ED7205048668BEB44A38 /* AppActivityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppActivityView.swift; sourceTree = "<group>"; };
|
||||||
@@ -1666,7 +1664,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>"; };
|
||||||
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>"; };
|
||||||
B5B243E7818E5E9F6A4EDC7A /* NoticeRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeRoomTimelineView.swift; sourceTree = "<group>"; };
|
B5B243E7818E5E9F6A4EDC7A /* NoticeRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeRoomTimelineView.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>"; };
|
||||||
B6311F21F911E23BE4DF51B4 /* ReadMarkerRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadMarkerRoomTimelineView.swift; sourceTree = "<group>"; };
|
B6311F21F911E23BE4DF51B4 /* ReadMarkerRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadMarkerRoomTimelineView.swift; 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>"; };
|
||||||
B697816AF93DA06EC58C5D70 /* WaitlistScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
B697816AF93DA06EC58C5D70 /* WaitlistScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||||
@@ -1717,7 +1715,6 @@
|
|||||||
C18CC37B97E77838609CFFE7 /* AdvancedSettingsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreen.swift; sourceTree = "<group>"; };
|
C18CC37B97E77838609CFFE7 /* AdvancedSettingsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreen.swift; sourceTree = "<group>"; };
|
||||||
C1D737F4672021D0A7D218CD /* OIDCAccountSettingsPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OIDCAccountSettingsPresenter.swift; sourceTree = "<group>"; };
|
C1D737F4672021D0A7D218CD /* OIDCAccountSettingsPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OIDCAccountSettingsPresenter.swift; sourceTree = "<group>"; };
|
||||||
C1FA515B3B0D61EF1E907D2D /* BadgeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BadgeView.swift; sourceTree = "<group>"; };
|
C1FA515B3B0D61EF1E907D2D /* BadgeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BadgeView.swift; sourceTree = "<group>"; };
|
||||||
C23B3FAD8B23C421BC0D1B1E /* MapTilerGeoCodingServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTilerGeoCodingServiceProtocol.swift; sourceTree = "<group>"; };
|
|
||||||
C2886615BEBAE33A0AA4D5F8 /* RoomScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomScreenModels.swift; sourceTree = "<group>"; };
|
C2886615BEBAE33A0AA4D5F8 /* RoomScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomScreenModels.swift; sourceTree = "<group>"; };
|
||||||
C2E9B841EE4878283ECDB554 /* InviteUsersScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteUsersScreen.swift; sourceTree = "<group>"; };
|
C2E9B841EE4878283ECDB554 /* InviteUsersScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteUsersScreen.swift; sourceTree = "<group>"; };
|
||||||
C2F079B5DBD0D85FEA687AAE /* SDKGeneratedMocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDKGeneratedMocks.swift; sourceTree = "<group>"; };
|
C2F079B5DBD0D85FEA687AAE /* SDKGeneratedMocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDKGeneratedMocks.swift; sourceTree = "<group>"; };
|
||||||
@@ -1771,7 +1768,7 @@
|
|||||||
CD95B3714F806AC9CF9A557B /* ComposerToolbarViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerToolbarViewModel.swift; sourceTree = "<group>"; };
|
CD95B3714F806AC9CF9A557B /* ComposerToolbarViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerToolbarViewModel.swift; sourceTree = "<group>"; };
|
||||||
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>"; };
|
||||||
CEE0E6043EFCF6FD2A341861 /* TimelineReplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineReplyView.swift; sourceTree = "<group>"; };
|
CEE0E6043EFCF6FD2A341861 /* TimelineReplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineReplyView.swift; sourceTree = "<group>"; };
|
||||||
CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; path = UnitTests.xctestplan; sourceTree = "<group>"; };
|
CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = "<group>"; };
|
||||||
CF48AF076424DBC1615C74AD /* AuthenticationServiceProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProxy.swift; sourceTree = "<group>"; };
|
CF48AF076424DBC1615C74AD /* AuthenticationServiceProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProxy.swift; sourceTree = "<group>"; };
|
||||||
D0140615D2232612C813FD6C /* EncryptedHistoryRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedHistoryRoomTimelineItem.swift; sourceTree = "<group>"; };
|
D0140615D2232612C813FD6C /* EncryptedHistoryRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedHistoryRoomTimelineItem.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>"; };
|
||||||
@@ -1833,7 +1830,6 @@
|
|||||||
E1A5FEF17ED7E6176D922D4F /* RoomDetailsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetailsScreen.swift; sourceTree = "<group>"; };
|
E1A5FEF17ED7E6176D922D4F /* RoomDetailsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetailsScreen.swift; sourceTree = "<group>"; };
|
||||||
E1E0B4A34E69BD2132BEC521 /* MessageText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageText.swift; sourceTree = "<group>"; };
|
E1E0B4A34E69BD2132BEC521 /* MessageText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageText.swift; sourceTree = "<group>"; };
|
||||||
E24B88AD3D1599E8CB1376E0 /* AvatarSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarSize.swift; sourceTree = "<group>"; };
|
E24B88AD3D1599E8CB1376E0 /* AvatarSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarSize.swift; sourceTree = "<group>"; };
|
||||||
E26747B3154A5DBC3A7E24A5 /* Image.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Image.swift; sourceTree = "<group>"; };
|
|
||||||
E26C69EC1157D71CC61ADAE4 /* ScaledPaddingModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScaledPaddingModifier.swift; sourceTree = "<group>"; };
|
E26C69EC1157D71CC61ADAE4 /* ScaledPaddingModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScaledPaddingModifier.swift; sourceTree = "<group>"; };
|
||||||
E2B1CC9AA154F4D5435BF60A /* Comparable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Comparable.swift; sourceTree = "<group>"; };
|
E2B1CC9AA154F4D5435BF60A /* Comparable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Comparable.swift; sourceTree = "<group>"; };
|
||||||
E2DCA495ED42D2463DDAA94D /* TimelineBubbleLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineBubbleLayout.swift; sourceTree = "<group>"; };
|
E2DCA495ED42D2463DDAA94D /* TimelineBubbleLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineBubbleLayout.swift; sourceTree = "<group>"; };
|
||||||
@@ -1876,7 +1872,7 @@
|
|||||||
ECF79FB25E2D4BD6F50CE7C9 /* RoomMembersListScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersListScreenViewModel.swift; sourceTree = "<group>"; };
|
ECF79FB25E2D4BD6F50CE7C9 /* RoomMembersListScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersListScreenViewModel.swift; sourceTree = "<group>"; };
|
||||||
ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.swift; sourceTree = "<group>"; };
|
ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.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>"; };
|
||||||
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; path = message.caf; sourceTree = "<group>"; };
|
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = message.caf; sourceTree = "<group>"; };
|
||||||
ED983D4DCA5AFA6E1ED96099 /* StateRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StateRoomTimelineView.swift; sourceTree = "<group>"; };
|
ED983D4DCA5AFA6E1ED96099 /* StateRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StateRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||||
EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.swift; sourceTree = "<group>"; };
|
EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.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>"; };
|
||||||
@@ -1892,7 +1888,7 @@
|
|||||||
F174A5627CDB3CAF280D1880 /* EmojiPickerScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenModels.swift; sourceTree = "<group>"; };
|
F174A5627CDB3CAF280D1880 /* EmojiPickerScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenModels.swift; sourceTree = "<group>"; };
|
||||||
F17EFA1D3D09FC2F9C5E1CB2 /* MediaProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaProvider.swift; sourceTree = "<group>"; };
|
F17EFA1D3D09FC2F9C5E1CB2 /* MediaProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaProvider.swift; sourceTree = "<group>"; };
|
||||||
F1B8500C152BC59445647DA8 /* UnsupportedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsupportedRoomTimelineItem.swift; sourceTree = "<group>"; };
|
F1B8500C152BC59445647DA8 /* UnsupportedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsupportedRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||||
F2D513D2477B57F90E98EEC0 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; path = portrait_test_video.mp4; sourceTree = "<group>"; };
|
F2D513D2477B57F90E98EEC0 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = portrait_test_video.mp4; sourceTree = "<group>"; };
|
||||||
F31F59030205A6F65B057E1A /* MatrixEntityRegexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatrixEntityRegexTests.swift; sourceTree = "<group>"; };
|
F31F59030205A6F65B057E1A /* MatrixEntityRegexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatrixEntityRegexTests.swift; sourceTree = "<group>"; };
|
||||||
F348B5F2C12F9D4F4B4D3884 /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = "<group>"; };
|
F348B5F2C12F9D4F4B4D3884 /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||||
F36C0A6D59717193F49EA986 /* UserSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionTests.swift; sourceTree = "<group>"; };
|
F36C0A6D59717193F49EA986 /* UserSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionTests.swift; sourceTree = "<group>"; };
|
||||||
@@ -2730,7 +2726,6 @@
|
|||||||
7FB2253D36E81E045E1CB432 /* Duration.swift */,
|
7FB2253D36E81E045E1CB432 /* Duration.swift */,
|
||||||
260004737C573A56FA01E86E /* Encodable.swift */,
|
260004737C573A56FA01E86E /* Encodable.swift */,
|
||||||
04DF593C3F7AF4B2FBAEB05D /* FileManager.swift */,
|
04DF593C3F7AF4B2FBAEB05D /* FileManager.swift */,
|
||||||
E26747B3154A5DBC3A7E24A5 /* Image.swift */,
|
|
||||||
4E2245243369B99216C7D84E /* ImageCache.swift */,
|
4E2245243369B99216C7D84E /* ImageCache.swift */,
|
||||||
045253F9967A535EE5B16691 /* Label.swift */,
|
045253F9967A535EE5B16691 /* Label.swift */,
|
||||||
C14D83B2B7CD5501A0089EFC /* LayoutDirection.swift */,
|
C14D83B2B7CD5501A0089EFC /* LayoutDirection.swift */,
|
||||||
@@ -4220,7 +4215,6 @@
|
|||||||
B81B6170DB690013CEB646F4 /* MapLibreModels.swift */,
|
B81B6170DB690013CEB646F4 /* MapLibreModels.swift */,
|
||||||
592A35163B0749C66BFD6186 /* MapLibreStaticMapView.swift */,
|
592A35163B0749C66BFD6186 /* MapLibreStaticMapView.swift */,
|
||||||
E062C1750EFC8627DE4CAB8E /* MapTilerAuthorization.swift */,
|
E062C1750EFC8627DE4CAB8E /* MapTilerAuthorization.swift */,
|
||||||
C23B3FAD8B23C421BC0D1B1E /* MapTilerGeoCodingServiceProtocol.swift */,
|
|
||||||
1A4D29F2683F5772AC72406F /* MapTilerStaticMap.swift */,
|
1A4D29F2683F5772AC72406F /* MapTilerStaticMap.swift */,
|
||||||
20872C3887F835958CE2F1D0 /* MapTilerStaticMapProtocol.swift */,
|
20872C3887F835958CE2F1D0 /* MapTilerStaticMapProtocol.swift */,
|
||||||
F0B9F5BC4C80543DE7228B9D /* MapTilerStyle.swift */,
|
F0B9F5BC4C80543DE7228B9D /* MapTilerStyle.swift */,
|
||||||
@@ -5442,7 +5436,6 @@
|
|||||||
D3986615892E7CF05C86518A /* HomeScreenUserMenuButton.swift in Sources */,
|
D3986615892E7CF05C86518A /* HomeScreenUserMenuButton.swift in Sources */,
|
||||||
DE4F8C4E0F1DB4832F09DE97 /* HomeScreenViewModel.swift in Sources */,
|
DE4F8C4E0F1DB4832F09DE97 /* HomeScreenViewModel.swift in Sources */,
|
||||||
56F0A22972A3BB519DA2261C /* HomeScreenViewModelProtocol.swift in Sources */,
|
56F0A22972A3BB519DA2261C /* HomeScreenViewModelProtocol.swift in Sources */,
|
||||||
03D684A3AE85A23B3DA3B43F /* Image.swift in Sources */,
|
|
||||||
BA31448FBD9697F8CB9A83CD /* ImageCache.swift in Sources */,
|
BA31448FBD9697F8CB9A83CD /* ImageCache.swift in Sources */,
|
||||||
85813D87DDD7F67A46BD9AF7 /* ImageProviderProtocol.swift in Sources */,
|
85813D87DDD7F67A46BD9AF7 /* ImageProviderProtocol.swift in Sources */,
|
||||||
7CD16990BA843BE9ED639129 /* ImageRoomTimelineItem.swift in Sources */,
|
7CD16990BA843BE9ED639129 /* ImageRoomTimelineItem.swift in Sources */,
|
||||||
@@ -5499,7 +5492,6 @@
|
|||||||
E2DDA49BD62F03F180A42E30 /* MapLibreStaticMapView.swift in Sources */,
|
E2DDA49BD62F03F180A42E30 /* MapLibreStaticMapView.swift in Sources */,
|
||||||
D181AC8FF236B7F91C0A8C28 /* MapTiler.swift in Sources */,
|
D181AC8FF236B7F91C0A8C28 /* MapTiler.swift in Sources */,
|
||||||
FCDA202B246F75BA28E10C5F /* MapTilerAuthorization.swift in Sources */,
|
FCDA202B246F75BA28E10C5F /* MapTilerAuthorization.swift in Sources */,
|
||||||
7ABAB3A1D52B86FACF2F74CF /* MapTilerGeoCodingServiceProtocol.swift in Sources */,
|
|
||||||
D6661A94DBD97658B2ADBD6A /* MapTilerStaticMap.swift in Sources */,
|
D6661A94DBD97658B2ADBD6A /* MapTilerStaticMap.swift in Sources */,
|
||||||
7B5DAB915357BE596529BF25 /* MapTilerStaticMapProtocol.swift in Sources */,
|
7B5DAB915357BE596529BF25 /* MapTilerStaticMapProtocol.swift in Sources */,
|
||||||
83A4DAB181C56987C3E804FF /* MapTilerStyle.swift in Sources */,
|
83A4DAB181C56987C3E804FF /* MapTilerStyle.swift in Sources */,
|
||||||
@@ -6092,9 +6084,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;
|
||||||
@@ -6125,9 +6115,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)";
|
||||||
@@ -6153,9 +6141,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)";
|
||||||
@@ -6398,9 +6384,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;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ final class AppSettings {
|
|||||||
/// Any pre-defined static client registrations for OIDC issuers.
|
/// Any pre-defined static client registrations for OIDC issuers.
|
||||||
let oidcStaticRegistrations: [URL: String] = ["https://id.thirdroom.io/realms/thirdroom": "elementx"]
|
let oidcStaticRegistrations: [URL: String] = ["https://id.thirdroom.io/realms/thirdroom": "elementx"]
|
||||||
/// The redirect URL used for OIDC.
|
/// The redirect URL used for OIDC.
|
||||||
let oidcRedirectURL: URL = "io.element:/callback"
|
let oidcRedirectURL = URL(string: "\(InfoPlistReader.main.appScheme):/callback")!
|
||||||
|
|
||||||
/// The date that the call to `/login` completed successfully. This is used to put
|
/// The date that the call to `/login` completed successfully. This is used to put
|
||||||
/// a hard wall on the history of encrypted messages until we have key backup.
|
/// a hard wall on the history of encrypted messages until we have key backup.
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ import SwiftUI
|
|||||||
class NavigationSplitCoordinator: CoordinatorProtocol, ObservableObject, CustomStringConvertible {
|
class NavigationSplitCoordinator: CoordinatorProtocol, ObservableObject, CustomStringConvertible {
|
||||||
fileprivate let placeholderModule: NavigationModule
|
fileprivate let placeholderModule: NavigationModule
|
||||||
|
|
||||||
private var cancellables = Set<AnyCancellable>()
|
|
||||||
|
|
||||||
var sidebarStackModuleCancellable: AnyCancellable?
|
var sidebarStackModuleCancellable: AnyCancellable?
|
||||||
|
|
||||||
@Published fileprivate var sidebarModule: NavigationModule? {
|
@Published fileprivate var sidebarModule: NavigationModule? {
|
||||||
@@ -111,6 +109,7 @@ class NavigationSplitCoordinator: CoordinatorProtocol, ObservableObject, CustomS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periphery:ignore - might be useful to have
|
||||||
/// The currently displayed fullscreen cover coordinator
|
/// The currently displayed fullscreen cover coordinator
|
||||||
var fullScreenCoverCoordinator: (any CoordinatorProtocol)? {
|
var fullScreenCoverCoordinator: (any CoordinatorProtocol)? {
|
||||||
fullScreenCoverModule?.coordinator
|
fullScreenCoverModule?.coordinator
|
||||||
@@ -502,6 +501,7 @@ class NavigationStackCoordinator: ObservableObject, CoordinatorProtocol, CustomS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periphery:ignore - might be useful to have
|
||||||
// The currently presented fullscreen cover coordinator
|
// The currently presented fullscreen cover coordinator
|
||||||
// Fullscreen covers will be presented through the NavigationSplitCoordinator if provided
|
// Fullscreen covers will be presented through the NavigationSplitCoordinator if provided
|
||||||
var fullScreenCoverCoordinator: (any CoordinatorProtocol)? {
|
var fullScreenCoverCoordinator: (any CoordinatorProtocol)? {
|
||||||
@@ -636,6 +636,7 @@ class NavigationStackCoordinator: ObservableObject, CoordinatorProtocol, CustomS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periphery:ignore - might be useful to have
|
||||||
/// Present a fullscreen cover on top of the stack. If this NavigationStackCoordinator is embedded within a NavigationSplitCoordinator
|
/// Present a fullscreen cover on top of the stack. If this NavigationStackCoordinator is embedded within a NavigationSplitCoordinator
|
||||||
/// then the presentation will be proxied to the split
|
/// then the presentation will be proxied to the split
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ class NavigationRootCoordinator: ObservableObject, CoordinatorProtocol, CustomSt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periphery:ignore - might be useful to have
|
||||||
// The currently presented sheet coordinator
|
// The currently presented sheet coordinator
|
||||||
// Sheets will be presented through the NavigationSplitCoordinator if provided
|
// Sheets will be presented through the NavigationSplitCoordinator if provided
|
||||||
var sheetCoordinator: (any CoordinatorProtocol)? {
|
var sheetCoordinator: (any CoordinatorProtocol)? {
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
break
|
break
|
||||||
|
|
||||||
case (.notificationSettings, .presentGlobalNotificationSettingsScreen, .globalNotificationSettings):
|
case (.notificationSettings, .presentGlobalNotificationSettingsScreen, .globalNotificationSettings):
|
||||||
presentGlobalNotificationSettingsScreen(animated: animated)
|
presentGlobalNotificationSettingsScreen()
|
||||||
case (.globalNotificationSettings, .dismissGlobalNotificationSettingsScreen, .notificationSettings):
|
case (.globalNotificationSettings, .dismissGlobalNotificationSettingsScreen, .notificationSettings):
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -981,7 +981,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func presentGlobalNotificationSettingsScreen(animated: Bool) {
|
private func presentGlobalNotificationSettingsScreen() {
|
||||||
let navigationCoordinator = NavigationStackCoordinator()
|
let navigationCoordinator = NavigationStackCoordinator()
|
||||||
let parameters = NotificationSettingsScreenCoordinatorParameters(navigationStackCoordinator: navigationCoordinator,
|
let parameters = NotificationSettingsScreenCoordinatorParameters(navigationStackCoordinator: navigationCoordinator,
|
||||||
userSession: userSession,
|
userSession: userSession,
|
||||||
|
|||||||
@@ -813,27 +813,6 @@ class KeychainControllerMock: KeychainControllerProtocol {
|
|||||||
setRestorationTokenForUsernameReceivedInvocations.append((restorationToken: restorationToken, forUsername: forUsername))
|
setRestorationTokenForUsernameReceivedInvocations.append((restorationToken: restorationToken, forUsername: forUsername))
|
||||||
setRestorationTokenForUsernameClosure?(restorationToken, forUsername)
|
setRestorationTokenForUsernameClosure?(restorationToken, forUsername)
|
||||||
}
|
}
|
||||||
//MARK: - restorationTokenForUsername
|
|
||||||
|
|
||||||
var restorationTokenForUsernameCallsCount = 0
|
|
||||||
var restorationTokenForUsernameCalled: Bool {
|
|
||||||
return restorationTokenForUsernameCallsCount > 0
|
|
||||||
}
|
|
||||||
var restorationTokenForUsernameReceivedUsername: String?
|
|
||||||
var restorationTokenForUsernameReceivedInvocations: [String] = []
|
|
||||||
var restorationTokenForUsernameReturnValue: RestorationToken?
|
|
||||||
var restorationTokenForUsernameClosure: ((String) -> RestorationToken?)?
|
|
||||||
|
|
||||||
func restorationTokenForUsername(_ username: String) -> RestorationToken? {
|
|
||||||
restorationTokenForUsernameCallsCount += 1
|
|
||||||
restorationTokenForUsernameReceivedUsername = username
|
|
||||||
restorationTokenForUsernameReceivedInvocations.append(username)
|
|
||||||
if let restorationTokenForUsernameClosure = restorationTokenForUsernameClosure {
|
|
||||||
return restorationTokenForUsernameClosure(username)
|
|
||||||
} else {
|
|
||||||
return restorationTokenForUsernameReturnValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//MARK: - restorationTokens
|
//MARK: - restorationTokens
|
||||||
|
|
||||||
var restorationTokensCallsCount = 0
|
var restorationTokensCallsCount = 0
|
||||||
@@ -879,18 +858,6 @@ class KeychainControllerMock: KeychainControllerProtocol {
|
|||||||
removeAllRestorationTokensCallsCount += 1
|
removeAllRestorationTokensCallsCount += 1
|
||||||
removeAllRestorationTokensClosure?()
|
removeAllRestorationTokensClosure?()
|
||||||
}
|
}
|
||||||
//MARK: - resetSecrets
|
|
||||||
|
|
||||||
var resetSecretsCallsCount = 0
|
|
||||||
var resetSecretsCalled: Bool {
|
|
||||||
return resetSecretsCallsCount > 0
|
|
||||||
}
|
|
||||||
var resetSecretsClosure: (() -> Void)?
|
|
||||||
|
|
||||||
func resetSecrets() {
|
|
||||||
resetSecretsCallsCount += 1
|
|
||||||
resetSecretsClosure?()
|
|
||||||
}
|
|
||||||
//MARK: - containsPINCode
|
//MARK: - containsPINCode
|
||||||
|
|
||||||
var containsPINCodeThrowableError: Error?
|
var containsPINCodeThrowableError: Error?
|
||||||
@@ -1227,16 +1194,6 @@ class NetworkMonitorMock: NetworkMonitorProtocol {
|
|||||||
set(value) { underlyingReachabilityPublisher = value }
|
set(value) { underlyingReachabilityPublisher = value }
|
||||||
}
|
}
|
||||||
var underlyingReachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never>!
|
var underlyingReachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never>!
|
||||||
var isCurrentConnectionExpensive: Bool {
|
|
||||||
get { return underlyingIsCurrentConnectionExpensive }
|
|
||||||
set(value) { underlyingIsCurrentConnectionExpensive = value }
|
|
||||||
}
|
|
||||||
var underlyingIsCurrentConnectionExpensive: Bool!
|
|
||||||
var isCurrentConnectionConstrained: Bool {
|
|
||||||
get { return underlyingIsCurrentConnectionConstrained }
|
|
||||||
set(value) { underlyingIsCurrentConnectionConstrained = value }
|
|
||||||
}
|
|
||||||
var underlyingIsCurrentConnectionConstrained: Bool!
|
|
||||||
|
|
||||||
}
|
}
|
||||||
class NotificationCenterMock: NotificationCenterProtocol {
|
class NotificationCenterMock: NotificationCenterProtocol {
|
||||||
@@ -1493,23 +1450,6 @@ class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol {
|
|||||||
restoreDefaultNotificationModeRoomIdReceivedInvocations.append(roomId)
|
restoreDefaultNotificationModeRoomIdReceivedInvocations.append(roomId)
|
||||||
try await restoreDefaultNotificationModeRoomIdClosure?(roomId)
|
try await restoreDefaultNotificationModeRoomIdClosure?(roomId)
|
||||||
}
|
}
|
||||||
//MARK: - containsKeywordsRules
|
|
||||||
|
|
||||||
var containsKeywordsRulesCallsCount = 0
|
|
||||||
var containsKeywordsRulesCalled: Bool {
|
|
||||||
return containsKeywordsRulesCallsCount > 0
|
|
||||||
}
|
|
||||||
var containsKeywordsRulesReturnValue: Bool!
|
|
||||||
var containsKeywordsRulesClosure: (() async -> Bool)?
|
|
||||||
|
|
||||||
func containsKeywordsRules() async -> Bool {
|
|
||||||
containsKeywordsRulesCallsCount += 1
|
|
||||||
if let containsKeywordsRulesClosure = containsKeywordsRulesClosure {
|
|
||||||
return await containsKeywordsRulesClosure()
|
|
||||||
} else {
|
|
||||||
return containsKeywordsRulesReturnValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//MARK: - unmuteRoom
|
//MARK: - unmuteRoom
|
||||||
|
|
||||||
var unmuteRoomRoomIdIsEncryptedIsOneToOneThrowableError: Error?
|
var unmuteRoomRoomIdIsEncryptedIsOneToOneThrowableError: Error?
|
||||||
@@ -1571,47 +1511,6 @@ class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol {
|
|||||||
setRoomMentionEnabledEnabledReceivedInvocations.append(enabled)
|
setRoomMentionEnabledEnabledReceivedInvocations.append(enabled)
|
||||||
try await setRoomMentionEnabledEnabledClosure?(enabled)
|
try await setRoomMentionEnabledEnabledClosure?(enabled)
|
||||||
}
|
}
|
||||||
//MARK: - isUserMentionEnabled
|
|
||||||
|
|
||||||
var isUserMentionEnabledThrowableError: Error?
|
|
||||||
var isUserMentionEnabledCallsCount = 0
|
|
||||||
var isUserMentionEnabledCalled: Bool {
|
|
||||||
return isUserMentionEnabledCallsCount > 0
|
|
||||||
}
|
|
||||||
var isUserMentionEnabledReturnValue: Bool!
|
|
||||||
var isUserMentionEnabledClosure: (() async throws -> Bool)?
|
|
||||||
|
|
||||||
func isUserMentionEnabled() async throws -> Bool {
|
|
||||||
if let error = isUserMentionEnabledThrowableError {
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
isUserMentionEnabledCallsCount += 1
|
|
||||||
if let isUserMentionEnabledClosure = isUserMentionEnabledClosure {
|
|
||||||
return try await isUserMentionEnabledClosure()
|
|
||||||
} else {
|
|
||||||
return isUserMentionEnabledReturnValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//MARK: - setUserMentionEnabled
|
|
||||||
|
|
||||||
var setUserMentionEnabledEnabledThrowableError: Error?
|
|
||||||
var setUserMentionEnabledEnabledCallsCount = 0
|
|
||||||
var setUserMentionEnabledEnabledCalled: Bool {
|
|
||||||
return setUserMentionEnabledEnabledCallsCount > 0
|
|
||||||
}
|
|
||||||
var setUserMentionEnabledEnabledReceivedEnabled: Bool?
|
|
||||||
var setUserMentionEnabledEnabledReceivedInvocations: [Bool] = []
|
|
||||||
var setUserMentionEnabledEnabledClosure: ((Bool) async throws -> Void)?
|
|
||||||
|
|
||||||
func setUserMentionEnabled(enabled: Bool) async throws {
|
|
||||||
if let error = setUserMentionEnabledEnabledThrowableError {
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
setUserMentionEnabledEnabledCallsCount += 1
|
|
||||||
setUserMentionEnabledEnabledReceivedEnabled = enabled
|
|
||||||
setUserMentionEnabledEnabledReceivedInvocations.append(enabled)
|
|
||||||
try await setUserMentionEnabledEnabledClosure?(enabled)
|
|
||||||
}
|
|
||||||
//MARK: - isCallEnabled
|
//MARK: - isCallEnabled
|
||||||
|
|
||||||
var isCallEnabledThrowableError: Error?
|
var isCallEnabledThrowableError: Error?
|
||||||
@@ -1746,21 +1645,6 @@ class RoomMemberProxyMock: RoomMemberProxyProtocol {
|
|||||||
set(value) { underlyingMembership = value }
|
set(value) { underlyingMembership = value }
|
||||||
}
|
}
|
||||||
var underlyingMembership: MembershipState!
|
var underlyingMembership: MembershipState!
|
||||||
var isNameAmbiguous: Bool {
|
|
||||||
get { return underlyingIsNameAmbiguous }
|
|
||||||
set(value) { underlyingIsNameAmbiguous = value }
|
|
||||||
}
|
|
||||||
var underlyingIsNameAmbiguous: Bool!
|
|
||||||
var powerLevel: Int {
|
|
||||||
get { return underlyingPowerLevel }
|
|
||||||
set(value) { underlyingPowerLevel = value }
|
|
||||||
}
|
|
||||||
var underlyingPowerLevel: Int!
|
|
||||||
var normalizedPowerLevel: Int {
|
|
||||||
get { return underlyingNormalizedPowerLevel }
|
|
||||||
set(value) { underlyingNormalizedPowerLevel = value }
|
|
||||||
}
|
|
||||||
var underlyingNormalizedPowerLevel: Int!
|
|
||||||
var isAccountOwner: Bool {
|
var isAccountOwner: Bool {
|
||||||
get { return underlyingIsAccountOwner }
|
get { return underlyingIsAccountOwner }
|
||||||
set(value) { underlyingIsAccountOwner = value }
|
set(value) { underlyingIsAccountOwner = value }
|
||||||
@@ -1872,11 +1756,6 @@ class RoomProxyMock: RoomProxyProtocol {
|
|||||||
set(value) { underlyingIsEncrypted = value }
|
set(value) { underlyingIsEncrypted = value }
|
||||||
}
|
}
|
||||||
var underlyingIsEncrypted: Bool!
|
var underlyingIsEncrypted: Bool!
|
||||||
var isTombstoned: Bool {
|
|
||||||
get { return underlyingIsTombstoned }
|
|
||||||
set(value) { underlyingIsTombstoned = value }
|
|
||||||
}
|
|
||||||
var underlyingIsTombstoned: Bool!
|
|
||||||
var membership: Membership {
|
var membership: Membership {
|
||||||
get { return underlyingMembership }
|
get { return underlyingMembership }
|
||||||
set(value) { underlyingMembership = value }
|
set(value) { underlyingMembership = value }
|
||||||
@@ -1888,7 +1767,6 @@ class RoomProxyMock: RoomProxyProtocol {
|
|||||||
}
|
}
|
||||||
var underlyingHasOngoingCall: Bool!
|
var underlyingHasOngoingCall: Bool!
|
||||||
var canonicalAlias: String?
|
var canonicalAlias: String?
|
||||||
var alternativeAliases: [String] = []
|
|
||||||
var hasUnreadNotifications: Bool {
|
var hasUnreadNotifications: Bool {
|
||||||
get { return underlyingHasUnreadNotifications }
|
get { return underlyingHasUnreadNotifications }
|
||||||
set(value) { underlyingHasUnreadNotifications = value }
|
set(value) { underlyingHasUnreadNotifications = value }
|
||||||
@@ -1908,11 +1786,6 @@ class RoomProxyMock: RoomProxyProtocol {
|
|||||||
set(value) { underlyingMembers = value }
|
set(value) { underlyingMembers = value }
|
||||||
}
|
}
|
||||||
var underlyingMembers: CurrentValuePublisher<[RoomMemberProxyProtocol], Never>!
|
var underlyingMembers: CurrentValuePublisher<[RoomMemberProxyProtocol], Never>!
|
||||||
var invitedMembersCount: Int {
|
|
||||||
get { return underlyingInvitedMembersCount }
|
|
||||||
set(value) { underlyingInvitedMembersCount = value }
|
|
||||||
}
|
|
||||||
var underlyingInvitedMembersCount: Int!
|
|
||||||
var joinedMembersCount: Int {
|
var joinedMembersCount: Int {
|
||||||
get { return underlyingJoinedMembersCount }
|
get { return underlyingJoinedMembersCount }
|
||||||
set(value) { underlyingJoinedMembersCount = value }
|
set(value) { underlyingJoinedMembersCount = value }
|
||||||
@@ -1933,11 +1806,6 @@ class RoomProxyMock: RoomProxyProtocol {
|
|||||||
set(value) { underlyingTimeline = value }
|
set(value) { underlyingTimeline = value }
|
||||||
}
|
}
|
||||||
var underlyingTimeline: TimelineProxyProtocol!
|
var underlyingTimeline: TimelineProxyProtocol!
|
||||||
var pollHistoryTimeline: TimelineProxyProtocol {
|
|
||||||
get { return underlyingPollHistoryTimeline }
|
|
||||||
set(value) { underlyingPollHistoryTimeline = value }
|
|
||||||
}
|
|
||||||
var underlyingPollHistoryTimeline: TimelineProxyProtocol!
|
|
||||||
|
|
||||||
//MARK: - subscribeForUpdates
|
//MARK: - subscribeForUpdates
|
||||||
|
|
||||||
@@ -1951,48 +1819,6 @@ class RoomProxyMock: RoomProxyProtocol {
|
|||||||
subscribeForUpdatesCallsCount += 1
|
subscribeForUpdatesCallsCount += 1
|
||||||
await subscribeForUpdatesClosure?()
|
await subscribeForUpdatesClosure?()
|
||||||
}
|
}
|
||||||
//MARK: - loadAvatarURLForUserId
|
|
||||||
|
|
||||||
var loadAvatarURLForUserIdCallsCount = 0
|
|
||||||
var loadAvatarURLForUserIdCalled: Bool {
|
|
||||||
return loadAvatarURLForUserIdCallsCount > 0
|
|
||||||
}
|
|
||||||
var loadAvatarURLForUserIdReceivedUserId: String?
|
|
||||||
var loadAvatarURLForUserIdReceivedInvocations: [String] = []
|
|
||||||
var loadAvatarURLForUserIdReturnValue: Result<URL?, RoomProxyError>!
|
|
||||||
var loadAvatarURLForUserIdClosure: ((String) async -> Result<URL?, RoomProxyError>)?
|
|
||||||
|
|
||||||
func loadAvatarURLForUserId(_ userId: String) async -> Result<URL?, RoomProxyError> {
|
|
||||||
loadAvatarURLForUserIdCallsCount += 1
|
|
||||||
loadAvatarURLForUserIdReceivedUserId = userId
|
|
||||||
loadAvatarURLForUserIdReceivedInvocations.append(userId)
|
|
||||||
if let loadAvatarURLForUserIdClosure = loadAvatarURLForUserIdClosure {
|
|
||||||
return await loadAvatarURLForUserIdClosure(userId)
|
|
||||||
} else {
|
|
||||||
return loadAvatarURLForUserIdReturnValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//MARK: - loadDisplayNameForUserId
|
|
||||||
|
|
||||||
var loadDisplayNameForUserIdCallsCount = 0
|
|
||||||
var loadDisplayNameForUserIdCalled: Bool {
|
|
||||||
return loadDisplayNameForUserIdCallsCount > 0
|
|
||||||
}
|
|
||||||
var loadDisplayNameForUserIdReceivedUserId: String?
|
|
||||||
var loadDisplayNameForUserIdReceivedInvocations: [String] = []
|
|
||||||
var loadDisplayNameForUserIdReturnValue: Result<String?, RoomProxyError>!
|
|
||||||
var loadDisplayNameForUserIdClosure: ((String) async -> Result<String?, RoomProxyError>)?
|
|
||||||
|
|
||||||
func loadDisplayNameForUserId(_ userId: String) async -> Result<String?, RoomProxyError> {
|
|
||||||
loadDisplayNameForUserIdCallsCount += 1
|
|
||||||
loadDisplayNameForUserIdReceivedUserId = userId
|
|
||||||
loadDisplayNameForUserIdReceivedInvocations.append(userId)
|
|
||||||
if let loadDisplayNameForUserIdClosure = loadDisplayNameForUserIdClosure {
|
|
||||||
return await loadDisplayNameForUserIdClosure(userId)
|
|
||||||
} else {
|
|
||||||
return loadDisplayNameForUserIdReturnValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//MARK: - redact
|
//MARK: - redact
|
||||||
|
|
||||||
var redactCallsCount = 0
|
var redactCallsCount = 0
|
||||||
@@ -2106,23 +1932,6 @@ class RoomProxyMock: RoomProxyProtocol {
|
|||||||
return getMemberUserIDReturnValue
|
return getMemberUserIDReturnValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//MARK: - inviter
|
|
||||||
|
|
||||||
var inviterCallsCount = 0
|
|
||||||
var inviterCalled: Bool {
|
|
||||||
return inviterCallsCount > 0
|
|
||||||
}
|
|
||||||
var inviterReturnValue: RoomMemberProxyProtocol?
|
|
||||||
var inviterClosure: (() async -> RoomMemberProxyProtocol?)?
|
|
||||||
|
|
||||||
func inviter() async -> RoomMemberProxyProtocol? {
|
|
||||||
inviterCallsCount += 1
|
|
||||||
if let inviterClosure = inviterClosure {
|
|
||||||
return await inviterClosure()
|
|
||||||
} else {
|
|
||||||
return inviterReturnValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//MARK: - rejectInvitation
|
//MARK: - rejectInvitation
|
||||||
|
|
||||||
var rejectInvitationCallsCount = 0
|
var rejectInvitationCallsCount = 0
|
||||||
|
|||||||
@@ -22,9 +22,6 @@ struct RoomMemberProxyMockConfiguration {
|
|||||||
var displayName: String
|
var displayName: String
|
||||||
var avatarURL: URL?
|
var avatarURL: URL?
|
||||||
var membership: MembershipState
|
var membership: MembershipState
|
||||||
var isNameAmbiguous = false
|
|
||||||
var powerLevel = 50
|
|
||||||
var normalizedPowerLevel = 50
|
|
||||||
var isAccountOwner = false
|
var isAccountOwner = false
|
||||||
var isIgnored = false
|
var isIgnored = false
|
||||||
var canInviteUsers = false
|
var canInviteUsers = false
|
||||||
@@ -38,9 +35,6 @@ extension RoomMemberProxyMock {
|
|||||||
displayName = configuration.displayName
|
displayName = configuration.displayName
|
||||||
avatarURL = configuration.avatarURL
|
avatarURL = configuration.avatarURL
|
||||||
membership = configuration.membership
|
membership = configuration.membership
|
||||||
isNameAmbiguous = configuration.isNameAmbiguous
|
|
||||||
powerLevel = configuration.powerLevel
|
|
||||||
normalizedPowerLevel = configuration.normalizedPowerLevel
|
|
||||||
isAccountOwner = configuration.isAccountOwner
|
isAccountOwner = configuration.isAccountOwner
|
||||||
isIgnored = configuration.isIgnored
|
isIgnored = configuration.isIgnored
|
||||||
canInviteUsers = configuration.canInviteUsers
|
canInviteUsers = configuration.canInviteUsers
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ struct RoomProxyMockConfiguration {
|
|||||||
var isSpace = Bool.random()
|
var isSpace = Bool.random()
|
||||||
var isPublic = Bool.random()
|
var isPublic = Bool.random()
|
||||||
var isEncrypted = true
|
var isEncrypted = true
|
||||||
var isTombstoned = Bool.random()
|
|
||||||
var hasOngoingCall = false
|
var hasOngoingCall = false
|
||||||
var canonicalAlias: String?
|
var canonicalAlias: String?
|
||||||
var alternativeAliases: [String] = []
|
var alternativeAliases: [String] = []
|
||||||
@@ -40,7 +39,6 @@ struct RoomProxyMockConfiguration {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
var members: [RoomMemberProxyProtocol]?
|
var members: [RoomMemberProxyProtocol]?
|
||||||
var inviter: RoomMemberProxyMock?
|
|
||||||
var memberForID: RoomMemberProxyMock = .mockMe
|
var memberForID: RoomMemberProxyMock = .mockMe
|
||||||
var ownUserID = "@alice:somewhere.org"
|
var ownUserID = "@alice:somewhere.org"
|
||||||
|
|
||||||
@@ -65,15 +63,12 @@ extension RoomProxyMock {
|
|||||||
isSpace = configuration.isSpace
|
isSpace = configuration.isSpace
|
||||||
isPublic = configuration.isPublic
|
isPublic = configuration.isPublic
|
||||||
isEncrypted = configuration.isEncrypted
|
isEncrypted = configuration.isEncrypted
|
||||||
isTombstoned = configuration.isTombstoned
|
|
||||||
hasOngoingCall = configuration.hasOngoingCall
|
hasOngoingCall = configuration.hasOngoingCall
|
||||||
canonicalAlias = configuration.canonicalAlias
|
canonicalAlias = configuration.canonicalAlias
|
||||||
alternativeAliases = configuration.alternativeAliases
|
|
||||||
hasUnreadNotifications = configuration.hasUnreadNotifications
|
hasUnreadNotifications = configuration.hasUnreadNotifications
|
||||||
|
|
||||||
timeline = configuration.timeline
|
timeline = configuration.timeline
|
||||||
|
|
||||||
invitedMembersCount = configuration.invitedMembersCount
|
|
||||||
joinedMembersCount = configuration.joinedMembersCount
|
joinedMembersCount = configuration.joinedMembersCount
|
||||||
activeMembersCount = configuration.activeMembersCount
|
activeMembersCount = configuration.activeMembersCount
|
||||||
ownUserID = configuration.ownUserID
|
ownUserID = configuration.ownUserID
|
||||||
@@ -84,10 +79,6 @@ extension RoomProxyMock {
|
|||||||
members = CurrentValueSubject([]).asCurrentValuePublisher()
|
members = CurrentValueSubject([]).asCurrentValuePublisher()
|
||||||
}
|
}
|
||||||
|
|
||||||
if let inviter = configuration.inviter {
|
|
||||||
inviterClosure = { inviter }
|
|
||||||
}
|
|
||||||
|
|
||||||
updateMembersClosure = { }
|
updateMembersClosure = { }
|
||||||
acceptInvitationClosure = { .success(()) }
|
acceptInvitationClosure = { .success(()) }
|
||||||
underlyingActions = Empty(completeImmediately: false).eraseToAnyPublisher()
|
underlyingActions = Empty(completeImmediately: false).eraseToAnyPublisher()
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ extension AlertInfo {
|
|||||||
message = L10n.errorUnknown
|
message = L10n.errorUnknown
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periphery: ignore - might be useful in the future
|
||||||
/// Initialises the type with the title from an `Error`'s localised description along with the default Ok button.
|
/// Initialises the type with the title from an `Error`'s localised description along with the default Ok button.
|
||||||
///
|
///
|
||||||
/// Currently this initialiser creates an alert for every error, however in the future it may be updated to filter
|
/// Currently this initialiser creates an alert for every error, however in the future it may be updated to filter
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
//
|
|
||||||
// Copyright 2022 New Vector Ltd
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
extension Image {
|
|
||||||
/// Empty image view
|
|
||||||
static let empty = Image(uiImage: .init(ciImage: .empty()))
|
|
||||||
}
|
|
||||||
@@ -18,23 +18,11 @@ import Foundation
|
|||||||
|
|
||||||
/// NSRegularExpressions work internally on NSStrings, we need to be careful how we build the ranges for extended grapheme clusters https://stackoverflow.com/a/27880748/730924
|
/// NSRegularExpressions work internally on NSStrings, we need to be careful how we build the ranges for extended grapheme clusters https://stackoverflow.com/a/27880748/730924
|
||||||
extension NSRegularExpression {
|
extension NSRegularExpression {
|
||||||
func enumerateMatches(in string: String, options: NSRegularExpression.MatchingOptions = [], using block: (NSTextCheckingResult?, NSRegularExpression.MatchingFlags, UnsafeMutablePointer<ObjCBool>) -> Void) {
|
|
||||||
enumerateMatches(in: string, options: options, range: .init(location: 0, length: (string as NSString).length), using: block)
|
|
||||||
}
|
|
||||||
|
|
||||||
func matches(in string: String, options: NSRegularExpression.MatchingOptions = []) -> [NSTextCheckingResult] {
|
func matches(in string: String, options: NSRegularExpression.MatchingOptions = []) -> [NSTextCheckingResult] {
|
||||||
matches(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
matches(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
||||||
}
|
}
|
||||||
|
|
||||||
func numberOfMatches(in string: String, options: NSRegularExpression.MatchingOptions = []) -> Int {
|
|
||||||
numberOfMatches(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
|
||||||
}
|
|
||||||
|
|
||||||
func firstMatch(in string: String, options: NSRegularExpression.MatchingOptions = []) -> NSTextCheckingResult? {
|
func firstMatch(in string: String, options: NSRegularExpression.MatchingOptions = []) -> NSTextCheckingResult? {
|
||||||
firstMatch(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
firstMatch(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
||||||
}
|
}
|
||||||
|
|
||||||
func rangeOfFirstMatch(in string: String, options: NSRegularExpression.MatchingOptions = []) -> NSRange {
|
|
||||||
rangeOfFirstMatch(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,9 +41,3 @@ extension PlatformViewVersionPredicate<ViewControllerType, UIViewController> {
|
|||||||
.iOS(.v16, .v17)
|
.iOS(.v16, .v17)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension PlatformViewVersionPredicate<NavigationStackType, UINavigationController> {
|
|
||||||
static var supportedVersions: Self {
|
|
||||||
.iOS(.v16, .v17)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ enum MXLog {
|
|||||||
|
|
||||||
// MARK: - Private
|
// MARK: - Private
|
||||||
|
|
||||||
|
// periphery:ignore:parameters function,column
|
||||||
private static func createSpan(_ name: String,
|
private static func createSpan(_ name: String,
|
||||||
level: LogLevel,
|
level: LogLevel,
|
||||||
file: String = #file,
|
file: String = #file,
|
||||||
@@ -177,6 +178,7 @@ enum MXLog {
|
|||||||
return Span(file: file, line: UInt32(line), level: level, target: target, name: name)
|
return Span(file: file, line: UInt32(line), level: level, target: target, name: name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periphery:ignore:parameters function,column,context
|
||||||
private static func log(_ message: Any,
|
private static func log(_ message: Any,
|
||||||
level: LogLevel,
|
level: LogLevel,
|
||||||
file: String = #file,
|
file: String = #file,
|
||||||
|
|||||||
@@ -230,15 +230,6 @@ extension MapLibreMapView {
|
|||||||
|
|
||||||
// MARK: - MGLMapView convenient methods
|
// MARK: - MGLMapView convenient methods
|
||||||
|
|
||||||
private extension MGLMapView {
|
|
||||||
func removeAllAnnotations() {
|
|
||||||
guard let annotations else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
removeAnnotations(annotations)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private extension MapTilerStyle {
|
private extension MapTilerStyle {
|
||||||
init(_ colorScheme: ColorScheme) {
|
init(_ colorScheme: ColorScheme) {
|
||||||
switch colorScheme {
|
switch colorScheme {
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
//
|
|
||||||
// Copyright 2023 New Vector Ltd
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
//
|
|
||||||
|
|
||||||
import CoreLocation
|
|
||||||
import Foundation
|
|
||||||
|
|
||||||
enum MapTilerGeocodingError: Error {
|
|
||||||
case wrongGeocodingURL
|
|
||||||
case geocodingFailed
|
|
||||||
}
|
|
||||||
|
|
||||||
protocol MapTilerGeoCodingServiceProtocol {
|
|
||||||
func reverseGeoCoding(for coordinate: CLLocationCoordinate2D) async -> Result<String, MapTilerGeocodingError>
|
|
||||||
}
|
|
||||||
@@ -27,14 +27,6 @@ class NetworkMonitor: NetworkMonitorProtocol {
|
|||||||
reachabilitySubject.asCurrentValuePublisher()
|
reachabilitySubject.asCurrentValuePublisher()
|
||||||
}
|
}
|
||||||
|
|
||||||
var isCurrentConnectionExpensive: Bool {
|
|
||||||
pathMonitor.currentPath.isExpensive
|
|
||||||
}
|
|
||||||
|
|
||||||
var isCurrentConnectionConstrained: Bool {
|
|
||||||
pathMonitor.currentPath.isConstrained
|
|
||||||
}
|
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
queue = DispatchQueue(label: "io.element.elementx.networkmonitor", qos: .background)
|
queue = DispatchQueue(label: "io.element.elementx.networkmonitor", qos: .background)
|
||||||
pathMonitor = NWPathMonitor()
|
pathMonitor = NWPathMonitor()
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ enum NetworkMonitorReachability {
|
|||||||
|
|
||||||
protocol NetworkMonitorProtocol {
|
protocol NetworkMonitorProtocol {
|
||||||
var reachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never> { get }
|
var reachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never> { get }
|
||||||
var isCurrentConnectionExpensive: Bool { get }
|
|
||||||
var isCurrentConnectionConstrained: Bool { get }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// sourcery: AutoMockable
|
// sourcery: AutoMockable
|
||||||
|
|||||||
@@ -80,10 +80,13 @@ final class PillAttachmentViewProvider: NSTextAttachmentViewProvider {
|
|||||||
// Fixes crashes when inserting mention pills in the composer on Mac
|
// Fixes crashes when inserting mention pills in the composer on Mac
|
||||||
// https://github.com/element-hq/element-x-ios/issues/2070
|
// https://github.com/element-hq/element-x-ios/issues/2070
|
||||||
|
|
||||||
|
// periphery:ignore - read comment above
|
||||||
static var supportsSecureCoding = false
|
static var supportsSecureCoding = false
|
||||||
|
|
||||||
|
// periphery:ignore - read comment above
|
||||||
func encode(with coder: NSCoder) { }
|
func encode(with coder: NSCoder) { }
|
||||||
|
|
||||||
|
// periphery:ignore - read comment above
|
||||||
init?(coder: NSCoder) {
|
init?(coder: NSCoder) {
|
||||||
fatalError("Not implemented")
|
fatalError("Not implemented")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ struct LoadableImage<TransformerView: View, PlaceholderView: View>: View {
|
|||||||
private struct LoadableImageContent<TransformerView: View, PlaceholderView: View>: View, ImageDataProvider {
|
private struct LoadableImageContent<TransformerView: View, PlaceholderView: View>: View, ImageDataProvider {
|
||||||
private let mediaSource: MediaSourceProxy
|
private let mediaSource: MediaSourceProxy
|
||||||
private let blurhash: String?
|
private let blurhash: String?
|
||||||
private let size: CGSize?
|
|
||||||
private let imageProvider: ImageProviderProtocol?
|
|
||||||
private let transformer: (AnyView) -> TransformerView
|
private let transformer: (AnyView) -> TransformerView
|
||||||
private let placeholder: () -> PlaceholderView
|
private let placeholder: () -> PlaceholderView
|
||||||
|
|
||||||
@@ -92,8 +90,6 @@ private struct LoadableImageContent<TransformerView: View, PlaceholderView: View
|
|||||||
placeholder: @escaping () -> PlaceholderView) {
|
placeholder: @escaping () -> PlaceholderView) {
|
||||||
self.mediaSource = mediaSource
|
self.mediaSource = mediaSource
|
||||||
self.blurhash = blurhash
|
self.blurhash = blurhash
|
||||||
self.size = size
|
|
||||||
self.imageProvider = imageProvider
|
|
||||||
self.transformer = transformer
|
self.transformer = transformer
|
||||||
self.placeholder = placeholder
|
self.placeholder = placeholder
|
||||||
_contentLoader = StateObject(wrappedValue: ContentLoader(mediaSource: mediaSource, size: size, imageProvider: imageProvider))
|
_contentLoader = StateObject(wrappedValue: ContentLoader(mediaSource: mediaSource, size: size, imageProvider: imageProvider))
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ import Compound
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct LocationMarkerView: View {
|
struct LocationMarkerView: View {
|
||||||
@Environment(\.dynamicTypeSize) private var dynamicTypeSize
|
|
||||||
|
|
||||||
var mode: Mode = .map
|
var mode: Mode = .map
|
||||||
enum Mode { case map, button }
|
enum Mode { case map, button }
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ private struct PINTextFieldStyle: TextFieldStyle {
|
|||||||
let pinCode: String
|
let pinCode: String
|
||||||
let isSecure: Bool
|
let isSecure: Bool
|
||||||
|
|
||||||
public func _body(configuration: TextField<_Label>) -> some View {
|
func _body(configuration: TextField<_Label>) -> some View {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
ForEach(0..<4) { index in
|
ForEach(0..<4) { index in
|
||||||
PINDigitField(digit: digit(index))
|
PINDigitField(digit: digit(index))
|
||||||
|
|||||||
@@ -35,22 +35,4 @@ enum LoginMode: Equatable {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var supportsPasswordFlow: Bool {
|
|
||||||
switch self {
|
|
||||||
case .password:
|
|
||||||
return true
|
|
||||||
default:
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var isUnsupported: Bool {
|
|
||||||
switch self {
|
|
||||||
case .unsupported:
|
|
||||||
return true
|
|
||||||
default:
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ final class LoginScreenCoordinator: CoordinatorProtocol {
|
|||||||
private let parameters: LoginScreenCoordinatorParameters
|
private let parameters: LoginScreenCoordinatorParameters
|
||||||
private var viewModel: LoginScreenViewModelProtocol
|
private var viewModel: LoginScreenViewModelProtocol
|
||||||
|
|
||||||
@CancellableTask private var currentTask: Task<Void, Error>?
|
|
||||||
|
|
||||||
private var authenticationService: AuthenticationServiceProxyProtocol { parameters.authenticationService }
|
private var authenticationService: AuthenticationServiceProxyProtocol { parameters.authenticationService }
|
||||||
|
|
||||||
private let actionsSubject: PassthroughSubject<LoginScreenCoordinatorAction, Never> = .init()
|
private let actionsSubject: PassthroughSubject<LoginScreenCoordinatorAction, Never> = .init()
|
||||||
|
|||||||
@@ -203,7 +203,6 @@ struct MessageComposer_Previews: PreviewProvider, TestablePreview {
|
|||||||
]
|
]
|
||||||
|
|
||||||
static func messageComposer(_ content: String = "",
|
static func messageComposer(_ content: String = "",
|
||||||
sendingDisabled: Bool = false,
|
|
||||||
mode: RoomScreenComposerMode = .default) -> MessageComposer {
|
mode: RoomScreenComposerMode = .default) -> MessageComposer {
|
||||||
let viewModel = WysiwygComposerViewModel(minHeight: 22,
|
let viewModel = WysiwygComposerViewModel(minHeight: 22,
|
||||||
maxExpandedHeight: 250)
|
maxExpandedHeight: 250)
|
||||||
@@ -228,7 +227,7 @@ struct MessageComposer_Previews: PreviewProvider, TestablePreview {
|
|||||||
|
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
VStack(spacing: 8) {
|
VStack(spacing: 8) {
|
||||||
messageComposer(sendingDisabled: true)
|
messageComposer()
|
||||||
|
|
||||||
messageComposer("Some message",
|
messageComposer("Some message",
|
||||||
mode: .edit(originalItemId: .random))
|
mode: .edit(originalItemId: .random))
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ enum PollFormScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class PollFormScreenCoordinator: CoordinatorProtocol {
|
final class PollFormScreenCoordinator: CoordinatorProtocol {
|
||||||
private let parameters: PollFormScreenCoordinatorParameters
|
|
||||||
private var viewModel: PollFormScreenViewModelProtocol
|
private var viewModel: PollFormScreenViewModelProtocol
|
||||||
private let actionsSubject: PassthroughSubject<PollFormScreenCoordinatorAction, Never> = .init()
|
private let actionsSubject: PassthroughSubject<PollFormScreenCoordinatorAction, Never> = .init()
|
||||||
private var cancellables = Set<AnyCancellable>()
|
private var cancellables = Set<AnyCancellable>()
|
||||||
@@ -38,8 +37,6 @@ final class PollFormScreenCoordinator: CoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(parameters: PollFormScreenCoordinatorParameters) {
|
init(parameters: PollFormScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
|
||||||
|
|
||||||
viewModel = PollFormScreenViewModel(mode: parameters.mode)
|
viewModel = PollFormScreenViewModel(mode: parameters.mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ private struct MediaPreviewViewController: UIViewControllerRepresentable {
|
|||||||
class PreviewHostingController: UIViewController, QLPreviewControllerDataSource, QLPreviewControllerDelegate {
|
class PreviewHostingController: UIViewController, QLPreviewControllerDataSource, QLPreviewControllerDelegate {
|
||||||
let previewItem: MediaPreviewItem
|
let previewItem: MediaPreviewItem
|
||||||
let shouldHideControls: Bool
|
let shouldHideControls: Bool
|
||||||
let dismissalPublisher: PassthroughSubject<Void, Never>
|
|
||||||
let onDismiss: () -> Void
|
let onDismiss: () -> Void
|
||||||
|
|
||||||
private var dismissalObserver: AnyCancellable?
|
private var dismissalObserver: AnyCancellable?
|
||||||
@@ -81,7 +80,6 @@ private struct MediaPreviewViewController: UIViewControllerRepresentable {
|
|||||||
onDismiss: @escaping () -> Void) {
|
onDismiss: @escaping () -> Void) {
|
||||||
self.previewItem = previewItem
|
self.previewItem = previewItem
|
||||||
self.shouldHideControls = shouldHideControls
|
self.shouldHideControls = shouldHideControls
|
||||||
self.dismissalPublisher = dismissalPublisher
|
|
||||||
self.onDismiss = onDismiss
|
self.onDismiss = onDismiss
|
||||||
|
|
||||||
super.init(nibName: nil, bundle: nil)
|
super.init(nibName: nil, bundle: nil)
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// perphery: ignore - used in release mode
|
||||||
func presentCrashedLastRunAlert() {
|
func presentCrashedLastRunAlert() {
|
||||||
state.bindings.alertInfo = AlertInfo(id: UUID(),
|
state.bindings.alertInfo = AlertInfo(id: UUID(),
|
||||||
title: L10n.crashDetectionDialogContent(InfoPlistReader.main.bundleDisplayName),
|
title: L10n.crashDetectionDialogContent(InfoPlistReader.main.bundleDisplayName),
|
||||||
|
|||||||
@@ -22,5 +22,6 @@ protocol HomeScreenViewModelProtocol {
|
|||||||
|
|
||||||
var context: HomeScreenViewModelType.Context { get }
|
var context: HomeScreenViewModelType.Context { get }
|
||||||
|
|
||||||
|
// periphery: ignore - used in release mode
|
||||||
func presentCrashedLastRunAlert()
|
func presentCrashedLastRunAlert()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ enum InviteUsersScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class InviteUsersScreenCoordinator: CoordinatorProtocol {
|
final class InviteUsersScreenCoordinator: CoordinatorProtocol {
|
||||||
private let parameters: InviteUsersScreenCoordinatorParameters
|
|
||||||
private let viewModel: InviteUsersScreenViewModelProtocol
|
private let viewModel: InviteUsersScreenViewModelProtocol
|
||||||
private let actionsSubject: PassthroughSubject<InviteUsersScreenCoordinatorAction, Never> = .init()
|
private let actionsSubject: PassthroughSubject<InviteUsersScreenCoordinatorAction, Never> = .init()
|
||||||
private var cancellables = Set<AnyCancellable>()
|
private var cancellables = Set<AnyCancellable>()
|
||||||
@@ -43,8 +42,6 @@ final class InviteUsersScreenCoordinator: CoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(parameters: InviteUsersScreenCoordinatorParameters) {
|
init(parameters: InviteUsersScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
|
||||||
|
|
||||||
viewModel = InviteUsersScreenViewModel(selectedUsers: parameters.selectedUsers,
|
viewModel = InviteUsersScreenViewModel(selectedUsers: parameters.selectedUsers,
|
||||||
roomType: parameters.roomType,
|
roomType: parameters.roomType,
|
||||||
mediaProvider: parameters.mediaProvider,
|
mediaProvider: parameters.mediaProvider,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import MatrixRustSDK
|
import MatrixRustSDK
|
||||||
|
|
||||||
|
// periphery:ignore - for generic conformance
|
||||||
enum InviteUsersScreenErrorType: Error {
|
enum InviteUsersScreenErrorType: Error {
|
||||||
case unknown
|
case unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ typealias InviteUsersScreenViewModelType = StateStoreViewModel<InviteUsersScreen
|
|||||||
|
|
||||||
class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScreenViewModelProtocol {
|
class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScreenViewModelProtocol {
|
||||||
private let roomType: InviteUsersScreenRoomType
|
private let roomType: InviteUsersScreenRoomType
|
||||||
private let mediaProvider: MediaProviderProtocol
|
|
||||||
private let userDiscoveryService: UserDiscoveryServiceProtocol
|
private let userDiscoveryService: UserDiscoveryServiceProtocol
|
||||||
private let appSettings: AppSettings
|
private let appSettings: AppSettings
|
||||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||||
@@ -40,7 +39,6 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
|
|||||||
appSettings: AppSettings,
|
appSettings: AppSettings,
|
||||||
userIndicatorController: UserIndicatorControllerProtocol) {
|
userIndicatorController: UserIndicatorControllerProtocol) {
|
||||||
self.roomType = roomType
|
self.roomType = roomType
|
||||||
self.mediaProvider = mediaProvider
|
|
||||||
self.userDiscoveryService = userDiscoveryService
|
self.userDiscoveryService = userDiscoveryService
|
||||||
self.appSettings = appSettings
|
self.appSettings = appSettings
|
||||||
self.userIndicatorController = userIndicatorController
|
self.userIndicatorController = userIndicatorController
|
||||||
@@ -89,6 +87,7 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periphery:ignore - automatically cancelled when set to nil
|
||||||
@CancellableTask
|
@CancellableTask
|
||||||
private var fetchUsersTask: Task<Void, Never>?
|
private var fetchUsersTask: Task<Void, Never>?
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ enum InvitesScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class InvitesScreenCoordinator: CoordinatorProtocol {
|
final class InvitesScreenCoordinator: CoordinatorProtocol {
|
||||||
private let parameters: InvitesScreenCoordinatorParameters
|
|
||||||
private var viewModel: InvitesScreenViewModelProtocol
|
private var viewModel: InvitesScreenViewModelProtocol
|
||||||
private let actionsSubject: PassthroughSubject<InvitesScreenCoordinatorAction, Never> = .init()
|
private let actionsSubject: PassthroughSubject<InvitesScreenCoordinatorAction, Never> = .init()
|
||||||
private var cancellables = Set<AnyCancellable>()
|
private var cancellables = Set<AnyCancellable>()
|
||||||
@@ -36,7 +35,6 @@ final class InvitesScreenCoordinator: CoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(parameters: InvitesScreenCoordinatorParameters) {
|
init(parameters: InvitesScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
|
||||||
viewModel = InvitesScreenViewModel(userSession: parameters.userSession,
|
viewModel = InvitesScreenViewModel(userSession: parameters.userSession,
|
||||||
appSettings: ServiceLocator.shared.settings,
|
appSettings: ServiceLocator.shared.settings,
|
||||||
analytics: ServiceLocator.shared.analytics,
|
analytics: ServiceLocator.shared.analytics,
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ class InvitesScreenViewModel: InvitesScreenViewModelType, InvitesScreenViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func displayError(_ error: RoomProxyError) {
|
private func displayError(_ error: RoomProxyError) {
|
||||||
|
MXLog.error("Failed to accept/decline invite: \(error)")
|
||||||
state.bindings.alertInfo = .init(id: true,
|
state.bindings.alertInfo = .init(id: true,
|
||||||
title: L10n.commonError,
|
title: L10n.commonError,
|
||||||
message: L10n.errorUnknown)
|
message: L10n.errorUnknown)
|
||||||
|
|||||||
-3
@@ -29,7 +29,6 @@ enum MessageForwardingScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class MessageForwardingScreenCoordinator: CoordinatorProtocol {
|
final class MessageForwardingScreenCoordinator: CoordinatorProtocol {
|
||||||
private let parameters: MessageForwardingScreenCoordinatorParameters
|
|
||||||
private var viewModel: MessageForwardingScreenViewModelProtocol
|
private var viewModel: MessageForwardingScreenViewModelProtocol
|
||||||
private let actionsSubject: PassthroughSubject<MessageForwardingScreenCoordinatorAction, Never> = .init()
|
private let actionsSubject: PassthroughSubject<MessageForwardingScreenCoordinatorAction, Never> = .init()
|
||||||
private var cancellables = Set<AnyCancellable>()
|
private var cancellables = Set<AnyCancellable>()
|
||||||
@@ -39,8 +38,6 @@ final class MessageForwardingScreenCoordinator: CoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(parameters: MessageForwardingScreenCoordinatorParameters) {
|
init(parameters: MessageForwardingScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
|
||||||
|
|
||||||
viewModel = MessageForwardingScreenViewModel(roomSummaryProvider: parameters.roomSummaryProvider,
|
viewModel = MessageForwardingScreenViewModel(roomSummaryProvider: parameters.roomSummaryProvider,
|
||||||
mediaProvider: parameters.mediaProvider,
|
mediaProvider: parameters.mediaProvider,
|
||||||
sourceRoomID: parameters.sourceRoomID)
|
sourceRoomID: parameters.sourceRoomID)
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import SwiftUI
|
|||||||
|
|
||||||
final class MigrationScreenCoordinator: CoordinatorProtocol {
|
final class MigrationScreenCoordinator: CoordinatorProtocol {
|
||||||
private var viewModel: MigrationScreenViewModelProtocol
|
private var viewModel: MigrationScreenViewModelProtocol
|
||||||
private var cancellables = Set<AnyCancellable>()
|
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
viewModel = MigrationScreenViewModel()
|
viewModel = MigrationScreenViewModel()
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
enum MigrationScreenViewModelAction { }
|
|
||||||
|
|
||||||
struct MigrationScreenViewState: BindableState { }
|
struct MigrationScreenViewState: BindableState { }
|
||||||
|
|
||||||
enum MigrationScreenViewAction { }
|
enum MigrationScreenViewAction { }
|
||||||
|
|||||||
@@ -20,12 +20,6 @@ import SwiftUI
|
|||||||
typealias MigrationScreenViewModelType = StateStoreViewModel<MigrationScreenViewState, MigrationScreenViewAction>
|
typealias MigrationScreenViewModelType = StateStoreViewModel<MigrationScreenViewState, MigrationScreenViewAction>
|
||||||
|
|
||||||
class MigrationScreenViewModel: MigrationScreenViewModelType, MigrationScreenViewModelProtocol {
|
class MigrationScreenViewModel: MigrationScreenViewModelType, MigrationScreenViewModelProtocol {
|
||||||
private var actionsSubject: PassthroughSubject<MigrationScreenViewModelAction, Never> = .init()
|
|
||||||
|
|
||||||
var actions: AnyPublisher<MigrationScreenViewModelAction, Never> {
|
|
||||||
actionsSubject.eraseToAnyPublisher()
|
|
||||||
}
|
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
super.init(initialViewState: MigrationScreenViewState())
|
super.init(initialViewState: MigrationScreenViewState())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,5 @@ import Combine
|
|||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
protocol MigrationScreenViewModelProtocol {
|
protocol MigrationScreenViewModelProtocol {
|
||||||
var actions: AnyPublisher<MigrationScreenViewModelAction, Never> { get }
|
|
||||||
var context: MigrationScreenViewModelType.Context { get }
|
var context: MigrationScreenViewModelType.Context { get }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,6 @@ enum OnboardingScreenCoordinatorAction {
|
|||||||
case login
|
case login
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The content displayed in a single screen page.
|
|
||||||
struct OnboardingScreenPageContent {
|
|
||||||
let title: AttributedString
|
|
||||||
let message: String
|
|
||||||
let image: ImageAsset
|
|
||||||
}
|
|
||||||
|
|
||||||
enum OnboardingScreenViewModelAction {
|
enum OnboardingScreenViewModelAction {
|
||||||
case login
|
case login
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,14 +18,8 @@ import Compound
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct ReportContentScreen: View {
|
struct ReportContentScreen: View {
|
||||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
|
||||||
|
|
||||||
@ObservedObject var context: ReportContentScreenViewModel.Context
|
@ObservedObject var context: ReportContentScreenViewModel.Context
|
||||||
|
|
||||||
private var horizontalPadding: CGFloat {
|
|
||||||
horizontalSizeClass == .regular ? 50 : 16
|
|
||||||
}
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
reasonSection
|
reasonSection
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ enum RoomDetailsScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
|
final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
|
||||||
private let parameters: RoomDetailsScreenCoordinatorParameters
|
|
||||||
private var viewModel: RoomDetailsScreenViewModelProtocol
|
private var viewModel: RoomDetailsScreenViewModelProtocol
|
||||||
|
|
||||||
private let actionsSubject: PassthroughSubject<RoomDetailsScreenCoordinatorAction, Never> = .init()
|
private let actionsSubject: PassthroughSubject<RoomDetailsScreenCoordinatorAction, Never> = .init()
|
||||||
@@ -46,8 +45,6 @@ final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(parameters: RoomDetailsScreenCoordinatorParameters) {
|
init(parameters: RoomDetailsScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
|
||||||
|
|
||||||
viewModel = RoomDetailsScreenViewModel(accountUserID: parameters.accountUserID,
|
viewModel = RoomDetailsScreenViewModel(accountUserID: parameters.accountUserID,
|
||||||
roomProxy: parameters.roomProxy,
|
roomProxy: parameters.roomProxy,
|
||||||
mediaProvider: parameters.mediaProvider,
|
mediaProvider: parameters.mediaProvider,
|
||||||
|
|||||||
@@ -219,12 +219,6 @@ extension RoomDetailsNotificationSettingsState {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` when the settings are loaded and `isDefault` is true.
|
|
||||||
var isDefault: Bool {
|
|
||||||
guard case let .loaded(settings) = self else { return false }
|
|
||||||
return settings.isDefault
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns `true` when the settings are loaded and `isDefault` is false.
|
/// Returns `true` when the settings are loaded and `isDefault` is false.
|
||||||
var isCustom: Bool {
|
var isCustom: Bool {
|
||||||
guard case let .loaded(settings) = self else { return false }
|
guard case let .loaded(settings) = self else { return false }
|
||||||
|
|||||||
-3
@@ -29,7 +29,6 @@ enum RoomMemberDetailsScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class RoomMemberDetailsScreenCoordinator: CoordinatorProtocol {
|
final class RoomMemberDetailsScreenCoordinator: CoordinatorProtocol {
|
||||||
private let parameters: RoomMemberDetailsScreenCoordinatorParameters
|
|
||||||
private var viewModel: RoomMemberDetailsScreenViewModelProtocol
|
private var viewModel: RoomMemberDetailsScreenViewModelProtocol
|
||||||
|
|
||||||
private let actionsSubject: PassthroughSubject<RoomMemberDetailsScreenCoordinatorAction, Never> = .init()
|
private let actionsSubject: PassthroughSubject<RoomMemberDetailsScreenCoordinatorAction, Never> = .init()
|
||||||
@@ -40,8 +39,6 @@ final class RoomMemberDetailsScreenCoordinator: CoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(parameters: RoomMemberDetailsScreenCoordinatorParameters) {
|
init(parameters: RoomMemberDetailsScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
|
||||||
|
|
||||||
viewModel = RoomMemberDetailsScreenViewModel(roomProxy: parameters.roomProxy,
|
viewModel = RoomMemberDetailsScreenViewModel(roomProxy: parameters.roomProxy,
|
||||||
roomMemberProxy: parameters.roomMemberProxy,
|
roomMemberProxy: parameters.roomMemberProxy,
|
||||||
mediaProvider: parameters.mediaProvider,
|
mediaProvider: parameters.mediaProvider,
|
||||||
|
|||||||
@@ -83,6 +83,5 @@ enum RoomMemberDetailsScreenViewAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum RoomMemberDetailsScreenError: Hashable {
|
enum RoomMemberDetailsScreenError: Hashable {
|
||||||
case alert(String)
|
|
||||||
case unknown
|
case unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ enum RoomMembersListScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class RoomMembersListScreenCoordinator: CoordinatorProtocol {
|
final class RoomMembersListScreenCoordinator: CoordinatorProtocol {
|
||||||
private let parameters: RoomMembersListScreenCoordinatorParameters
|
|
||||||
private var viewModel: RoomMembersListScreenViewModelProtocol
|
private var viewModel: RoomMembersListScreenViewModelProtocol
|
||||||
|
|
||||||
private let actionsSubject: PassthroughSubject<RoomMembersListScreenCoordinatorAction, Never> = .init()
|
private let actionsSubject: PassthroughSubject<RoomMembersListScreenCoordinatorAction, Never> = .init()
|
||||||
@@ -39,8 +38,6 @@ final class RoomMembersListScreenCoordinator: CoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(parameters: RoomMembersListScreenCoordinatorParameters) {
|
init(parameters: RoomMembersListScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
|
||||||
|
|
||||||
viewModel = RoomMembersListScreenViewModel(roomProxy: parameters.roomProxy,
|
viewModel = RoomMembersListScreenViewModel(roomProxy: parameters.roomProxy,
|
||||||
mediaProvider: parameters.mediaProvider,
|
mediaProvider: parameters.mediaProvider,
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ import Compound
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct RoomMembersListScreen: View {
|
struct RoomMembersListScreen: View {
|
||||||
@Environment(\.colorScheme) private var colorScheme
|
|
||||||
|
|
||||||
@ObservedObject var context: RoomMembersListScreenViewModel.Context
|
@ObservedObject var context: RoomMembersListScreenViewModel.Context
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
|||||||
-4
@@ -39,10 +39,6 @@ final class RoomNotificationSettingsScreenCoordinator: CoordinatorProtocol {
|
|||||||
actionsSubject.eraseToAnyPublisher()
|
actionsSubject.eraseToAnyPublisher()
|
||||||
}
|
}
|
||||||
|
|
||||||
private var navigationStackCoordinator: NavigationStackCoordinator? {
|
|
||||||
parameters.navigationStackCoordinator
|
|
||||||
}
|
|
||||||
|
|
||||||
init(parameters: RoomNotificationSettingsScreenCoordinatorParameters) {
|
init(parameters: RoomNotificationSettingsScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
self.parameters = parameters
|
||||||
viewModel = RoomNotificationSettingsScreenViewModel(notificationSettingsProxy: parameters.notificationSettingsProxy,
|
viewModel = RoomNotificationSettingsScreenViewModel(notificationSettingsProxy: parameters.notificationSettingsProxy,
|
||||||
|
|||||||
-1
@@ -81,7 +81,6 @@ struct RoomNotificationSettingsScreenViewState: BindableState {
|
|||||||
|
|
||||||
struct RoomNotificationSettingsScreenViewStateBindings {
|
struct RoomNotificationSettingsScreenViewStateBindings {
|
||||||
var allowCustomSetting = false
|
var allowCustomSetting = false
|
||||||
var customMode: RoomNotificationModeProxy = .allMessages
|
|
||||||
/// Information describing the currently displayed alert.
|
/// Information describing the currently displayed alert.
|
||||||
var alertInfo: AlertInfo<RoomNotificationSettingsScreenErrorType>?
|
var alertInfo: AlertInfo<RoomNotificationSettingsScreenErrorType>?
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -24,6 +24,7 @@ class RoomNotificationSettingsScreenViewModel: RoomNotificationSettingsScreenVie
|
|||||||
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
|
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
|
||||||
private let roomProxy: RoomProxyProtocol
|
private let roomProxy: RoomProxyProtocol
|
||||||
|
|
||||||
|
// periphery:ignore - cancellable tasks cancel when reassigned
|
||||||
@CancellableTask private var fetchNotificationSettingsTask: Task<Void, Error>?
|
@CancellableTask private var fetchNotificationSettingsTask: Task<Void, Error>?
|
||||||
|
|
||||||
var actions: AnyPublisher<RoomNotificationSettingsScreenViewModelAction, Never> {
|
var actions: AnyPublisher<RoomNotificationSettingsScreenViewModelAction, Never> {
|
||||||
@@ -94,9 +95,6 @@ class RoomNotificationSettingsScreenViewModel: RoomNotificationSettingsScreenVie
|
|||||||
if !state.isRestoringDefaultSetting {
|
if !state.isRestoringDefaultSetting {
|
||||||
state.bindings.allowCustomSetting = !settings.isDefault
|
state.bindings.allowCustomSetting = !settings.isDefault
|
||||||
}
|
}
|
||||||
if state.pendingCustomMode == nil {
|
|
||||||
state.bindings.customMode = settings.mode
|
|
||||||
}
|
|
||||||
} catch {
|
} catch {
|
||||||
state.notificationSettingsState = .error
|
state.notificationSettingsState = .error
|
||||||
displayError(.loadingSettingsFailed)
|
displayError(.loadingSettingsFailed)
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ enum RoomScreenCoordinatorAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class RoomScreenCoordinator: CoordinatorProtocol {
|
final class RoomScreenCoordinator: CoordinatorProtocol {
|
||||||
private var parameters: RoomScreenCoordinatorParameters
|
|
||||||
private var viewModel: RoomScreenViewModelProtocol
|
private var viewModel: RoomScreenViewModelProtocol
|
||||||
private var composerViewModel: ComposerToolbarViewModel
|
private var composerViewModel: ComposerToolbarViewModel
|
||||||
private var wysiwygViewModel: WysiwygComposerViewModel
|
private var wysiwygViewModel: WysiwygComposerViewModel
|
||||||
@@ -58,8 +57,6 @@ final class RoomScreenCoordinator: CoordinatorProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(parameters: RoomScreenCoordinatorParameters) {
|
init(parameters: RoomScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
|
||||||
|
|
||||||
viewModel = RoomScreenViewModel(roomProxy: parameters.roomProxy,
|
viewModel = RoomScreenViewModel(roomProxy: parameters.roomProxy,
|
||||||
timelineController: parameters.timelineController,
|
timelineController: parameters.timelineController,
|
||||||
mediaProvider: parameters.mediaProvider,
|
mediaProvider: parameters.mediaProvider,
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ struct ReactionsSummaryView: View {
|
|||||||
|
|
||||||
@State var selectedReactionKey: String
|
@State var selectedReactionKey: String
|
||||||
|
|
||||||
var selectedReactionIndex: Int {
|
|
||||||
reactions.firstIndex(where: { $0.key == selectedReactionKey }) ?? 0
|
|
||||||
}
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
reactionButtons
|
reactionButtons
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import SwiftUI
|
|||||||
|
|
||||||
struct PollRoomTimelineView: View {
|
struct PollRoomTimelineView: View {
|
||||||
let timelineItem: PollRoomTimelineItem
|
let timelineItem: PollRoomTimelineItem
|
||||||
@Environment(\.timelineStyle) var timelineStyle
|
|
||||||
@EnvironmentObject private var context: RoomScreenViewModel.Context
|
@EnvironmentObject private var context: RoomScreenViewModel.Context
|
||||||
|
|
||||||
private let feedbackGenerator = UIImpactFeedbackGenerator(style: .heavy)
|
private let feedbackGenerator = UIImpactFeedbackGenerator(style: .heavy)
|
||||||
|
|||||||
+1
-1
@@ -14,13 +14,13 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
// periphery:ignore:all - subscripts lead to false positives
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct AdvancedSettingsScreenViewState: BindableState {
|
struct AdvancedSettingsScreenViewState: BindableState {
|
||||||
var bindings: AdvancedSettingsScreenViewStateBindings
|
var bindings: AdvancedSettingsScreenViewStateBindings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periphery:ignore - subscript are seen as false positives
|
||||||
@dynamicMemberLookup
|
@dynamicMemberLookup
|
||||||
struct AdvancedSettingsScreenViewStateBindings {
|
struct AdvancedSettingsScreenViewStateBindings {
|
||||||
private let advancedSettings: AdvancedSettingsProtocol
|
private let advancedSettings: AdvancedSettingsProtocol
|
||||||
|
|||||||
+1
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
// periphery:ignore - required for the architecture
|
||||||
enum LegalInformationScreenViewModelAction { }
|
enum LegalInformationScreenViewModelAction { }
|
||||||
|
|
||||||
struct LegalInformationScreenViewState: BindableState {
|
struct LegalInformationScreenViewState: BindableState {
|
||||||
|
|||||||
+1
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
import Combine
|
import Combine
|
||||||
|
|
||||||
|
// periphery:ignore - markdown protocol
|
||||||
@MainActor
|
@MainActor
|
||||||
protocol LegalInformationScreenViewModelProtocol {
|
protocol LegalInformationScreenViewModelProtocol {
|
||||||
var context: LegalInformationScreenViewModelType.Context { get }
|
var context: LegalInformationScreenViewModelType.Context { get }
|
||||||
|
|||||||
-7
@@ -24,18 +24,11 @@ struct NotificationSettingsEditScreenCoordinatorParameters {
|
|||||||
let notificationSettings: NotificationSettingsProxyProtocol
|
let notificationSettings: NotificationSettingsProxyProtocol
|
||||||
}
|
}
|
||||||
|
|
||||||
enum NotificationSettingsEditScreenCoordinatorAction { }
|
|
||||||
|
|
||||||
final class NotificationSettingsEditScreenCoordinator: CoordinatorProtocol {
|
final class NotificationSettingsEditScreenCoordinator: CoordinatorProtocol {
|
||||||
private let parameters: NotificationSettingsEditScreenCoordinatorParameters
|
private let parameters: NotificationSettingsEditScreenCoordinatorParameters
|
||||||
private var viewModel: NotificationSettingsEditScreenViewModelProtocol
|
private var viewModel: NotificationSettingsEditScreenViewModelProtocol
|
||||||
private let actionsSubject: PassthroughSubject<NotificationSettingsEditScreenCoordinatorAction, Never> = .init()
|
|
||||||
private var cancellables = Set<AnyCancellable>()
|
private var cancellables = Set<AnyCancellable>()
|
||||||
|
|
||||||
var actions: AnyPublisher<NotificationSettingsEditScreenCoordinatorAction, Never> {
|
|
||||||
actionsSubject.eraseToAnyPublisher()
|
|
||||||
}
|
|
||||||
|
|
||||||
init(parameters: NotificationSettingsEditScreenCoordinatorParameters) {
|
init(parameters: NotificationSettingsEditScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
self.parameters = parameters
|
||||||
|
|
||||||
|
|||||||
-12
@@ -53,7 +53,6 @@ struct NotificationSettingsEditScreenViewState: BindableState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct NotificationSettingsEditScreenViewStateBindings {
|
struct NotificationSettingsEditScreenViewStateBindings {
|
||||||
var searchQuery = ""
|
|
||||||
var alertInfo: AlertInfo<NotificationSettingsEditScreenErrorType>?
|
var alertInfo: AlertInfo<NotificationSettingsEditScreenErrorType>?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,8 +102,6 @@ struct NotificationSettingsEditScreenStrings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct NotificationSettingsEditScreenRoom: Identifiable, Equatable {
|
struct NotificationSettingsEditScreenRoom: Identifiable, Equatable {
|
||||||
static let placeholderLastMessage = AttributedString("Hidden last message")
|
|
||||||
|
|
||||||
/// The list item identifier can be a real room identifier, a custom one for invalidated entries
|
/// The list item identifier can be a real room identifier, a custom one for invalidated entries
|
||||||
/// or a completely unique one for empty items and skeletons
|
/// or a completely unique one for empty items and skeletons
|
||||||
let id: String
|
let id: String
|
||||||
@@ -117,13 +114,4 @@ struct NotificationSettingsEditScreenRoom: Identifiable, Equatable {
|
|||||||
var avatarURL: URL?
|
var avatarURL: URL?
|
||||||
|
|
||||||
var notificationMode: RoomNotificationModeProxy?
|
var notificationMode: RoomNotificationModeProxy?
|
||||||
|
|
||||||
var isPlaceholder = false
|
|
||||||
|
|
||||||
static func placeholder() -> NotificationSettingsEditScreenRoom {
|
|
||||||
NotificationSettingsEditScreenRoom(id: UUID().uuidString,
|
|
||||||
roomId: nil,
|
|
||||||
name: "Placeholder room name",
|
|
||||||
isPlaceholder: true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -26,7 +26,9 @@ class NotificationSettingsEditScreenViewModel: NotificationSettingsEditScreenVie
|
|||||||
private let userSession: UserSessionProtocol
|
private let userSession: UserSessionProtocol
|
||||||
private let roomSummaryProvider: RoomSummaryProviderProtocol?
|
private let roomSummaryProvider: RoomSummaryProviderProtocol?
|
||||||
|
|
||||||
|
// periphery:ignore - cancellable tasks get cancelled when reassigned
|
||||||
@CancellableTask private var fetchDefaultRoomNotificationModesTask: Task<Void, Error>?
|
@CancellableTask private var fetchDefaultRoomNotificationModesTask: Task<Void, Error>?
|
||||||
|
// periphery:ignore - cancellable tasks get cancelled when reassigned
|
||||||
@CancellableTask private var updateRoomsWithUserDefinedModeTask: Task<Void, Error>?
|
@CancellableTask private var updateRoomsWithUserDefinedModeTask: Task<Void, Error>?
|
||||||
|
|
||||||
var actions: AnyPublisher<NotificationSettingsEditScreenViewModelAction, Never> {
|
var actions: AnyPublisher<NotificationSettingsEditScreenViewModelAction, Never> {
|
||||||
|
|||||||
-1
@@ -19,7 +19,6 @@ import SwiftUI
|
|||||||
|
|
||||||
struct NotificationSettingsEditScreen: View {
|
struct NotificationSettingsEditScreen: View {
|
||||||
@ObservedObject var context: NotificationSettingsEditScreenViewModel.Context
|
@ObservedObject var context: NotificationSettingsEditScreenViewModel.Context
|
||||||
@State var isSearching = false
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
|
|||||||
+1
-2
@@ -46,8 +46,7 @@ final class NotificationSettingsScreenCoordinator: CoordinatorProtocol {
|
|||||||
init(parameters: NotificationSettingsScreenCoordinatorParameters) {
|
init(parameters: NotificationSettingsScreenCoordinatorParameters) {
|
||||||
self.parameters = parameters
|
self.parameters = parameters
|
||||||
|
|
||||||
viewModel = NotificationSettingsScreenViewModel(userSession: parameters.userSession,
|
viewModel = NotificationSettingsScreenViewModel(appSettings: ServiceLocator.shared.settings,
|
||||||
appSettings: ServiceLocator.shared.settings,
|
|
||||||
userNotificationCenter: parameters.userNotificationCenter,
|
userNotificationCenter: parameters.userNotificationCenter,
|
||||||
notificationSettingsProxy: parameters.notificationSettings,
|
notificationSettingsProxy: parameters.notificationSettings,
|
||||||
isModallyPresented: parameters.isModallyPresented)
|
isModallyPresented: parameters.isModallyPresented)
|
||||||
|
|||||||
-1
@@ -27,7 +27,6 @@ struct NotificationSettingsScreenViewState: BindableState {
|
|||||||
var strings = NotificationSettingsScreenStrings()
|
var strings = NotificationSettingsScreenStrings()
|
||||||
let isModallyPresented: Bool
|
let isModallyPresented: Bool
|
||||||
var isUserPermissionGranted: Bool?
|
var isUserPermissionGranted: Bool?
|
||||||
var allowedNotificationModes: [RoomNotificationModeProxy] = [.allMessages, .mentionsAndKeywordsOnly]
|
|
||||||
var fixingConfigurationMismatch = false
|
var fixingConfigurationMismatch = false
|
||||||
// Hide calls settings until calls are available in El-X
|
// Hide calls settings until calls are available in El-X
|
||||||
let showCallsSettings = false
|
let showCallsSettings = false
|
||||||
|
|||||||
+2
-3
@@ -24,15 +24,14 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy
|
|||||||
private let appSettings: AppSettings
|
private let appSettings: AppSettings
|
||||||
private let userNotificationCenter: UserNotificationCenterProtocol
|
private let userNotificationCenter: UserNotificationCenterProtocol
|
||||||
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
|
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
|
||||||
private let userSession: UserSessionProtocol
|
// periphery:ignore - cancellable tasks get cancelled when reassigned
|
||||||
@CancellableTask private var fetchSettingsTask: Task<Void, Error>?
|
@CancellableTask private var fetchSettingsTask: Task<Void, Error>?
|
||||||
|
|
||||||
var actions: AnyPublisher<NotificationSettingsScreenViewModelAction, Never> {
|
var actions: AnyPublisher<NotificationSettingsScreenViewModelAction, Never> {
|
||||||
actionsSubject.eraseToAnyPublisher()
|
actionsSubject.eraseToAnyPublisher()
|
||||||
}
|
}
|
||||||
|
|
||||||
init(userSession: UserSessionProtocol, appSettings: AppSettings, userNotificationCenter: UserNotificationCenterProtocol, notificationSettingsProxy: NotificationSettingsProxyProtocol, isModallyPresented: Bool) {
|
init(appSettings: AppSettings, userNotificationCenter: UserNotificationCenterProtocol, notificationSettingsProxy: NotificationSettingsProxyProtocol, isModallyPresented: Bool) {
|
||||||
self.userSession = userSession
|
|
||||||
self.appSettings = appSettings
|
self.appSettings = appSettings
|
||||||
self.userNotificationCenter = userNotificationCenter
|
self.userNotificationCenter = userNotificationCenter
|
||||||
self.notificationSettingsProxy = notificationSettingsProxy
|
self.notificationSettingsProxy = notificationSettingsProxy
|
||||||
|
|||||||
+2
-4
@@ -220,8 +220,7 @@ struct NotificationSettingsScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "John Doe"), mediaProvider: MockMediaProvider(),
|
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "John Doe"), mediaProvider: MockMediaProvider(),
|
||||||
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
||||||
|
|
||||||
var viewModel = NotificationSettingsScreenViewModel(userSession: userSession,
|
var viewModel = NotificationSettingsScreenViewModel(appSettings: appSettings,
|
||||||
appSettings: appSettings,
|
|
||||||
userNotificationCenter: notificationCenter,
|
userNotificationCenter: notificationCenter,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy,
|
||||||
isModallyPresented: true)
|
isModallyPresented: true)
|
||||||
@@ -249,8 +248,7 @@ struct NotificationSettingsScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
|
|
||||||
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "John Doe"), mediaProvider: MockMediaProvider(), voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "John Doe"), mediaProvider: MockMediaProvider(), voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
||||||
|
|
||||||
var viewModel = NotificationSettingsScreenViewModel(userSession: userSession,
|
var viewModel = NotificationSettingsScreenViewModel(appSettings: appSettings,
|
||||||
appSettings: appSettings,
|
|
||||||
userNotificationCenter: notificationCenter,
|
userNotificationCenter: notificationCenter,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy,
|
||||||
isModallyPresented: true)
|
isModallyPresented: true)
|
||||||
|
|||||||
@@ -50,10 +50,6 @@ class PostHogAnalyticsClient: AnalyticsClientProtocol {
|
|||||||
// it. Keep it around to avoid having multiple instances if the user re-enables
|
// it. Keep it around to avoid having multiple instances if the user re-enables
|
||||||
}
|
}
|
||||||
|
|
||||||
func flush() {
|
|
||||||
postHog?.flush()
|
|
||||||
}
|
|
||||||
|
|
||||||
func capture(_ event: AnalyticsEventProtocol) {
|
func capture(_ event: AnalyticsEventProtocol) {
|
||||||
guard isRunning else { return }
|
guard isRunning else { return }
|
||||||
postHog?.capture(event.eventName, properties: attachUserProperties(to: event.properties))
|
postHog?.capture(event.eventName, properties: attachUserProperties(to: event.properties))
|
||||||
|
|||||||
@@ -27,15 +27,12 @@ protocol KeychainControllerProtocol: ClientSessionDelegate {
|
|||||||
// MARK: Restoration Tokens
|
// MARK: Restoration Tokens
|
||||||
|
|
||||||
func setRestorationToken(_ restorationToken: RestorationToken, forUsername: String)
|
func setRestorationToken(_ restorationToken: RestorationToken, forUsername: String)
|
||||||
func restorationTokenForUsername(_ username: String) -> RestorationToken?
|
|
||||||
func restorationTokens() -> [KeychainCredentials]
|
func restorationTokens() -> [KeychainCredentials]
|
||||||
func removeRestorationTokenForUsername(_ username: String)
|
func removeRestorationTokenForUsername(_ username: String)
|
||||||
func removeAllRestorationTokens()
|
func removeAllRestorationTokens()
|
||||||
|
|
||||||
// MARK: App Secrets
|
// MARK: App Secrets
|
||||||
|
|
||||||
/// Removes everything from the keychain excluding any restoration tokens.
|
|
||||||
func resetSecrets()
|
|
||||||
/// Whether or not an App Lock PIN code has been set.
|
/// Whether or not an App Lock PIN code has been set.
|
||||||
func containsPINCode() throws -> Bool
|
func containsPINCode() throws -> Bool
|
||||||
/// Sets a new PIN code for App Lock.
|
/// Sets a new PIN code for App Lock.
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ indirect enum MediaUploadingPreprocessorError: Error {
|
|||||||
case failedProcessingImage(MediaUploadingPreprocessorError)
|
case failedProcessingImage(MediaUploadingPreprocessorError)
|
||||||
case failedProcessingVideo(MediaUploadingPreprocessorError)
|
case failedProcessingVideo(MediaUploadingPreprocessorError)
|
||||||
case failedProcessingAudio
|
case failedProcessingAudio
|
||||||
case failedProcessingFile
|
|
||||||
|
|
||||||
case failedGeneratingVideoThumbnail(Error?)
|
case failedGeneratingVideoThumbnail(Error?)
|
||||||
case failedGeneratingImageThumbnail(Error?)
|
case failedGeneratingImageThumbnail(Error?)
|
||||||
|
|||||||
@@ -28,8 +28,4 @@ extension ImageProviderProtocol {
|
|||||||
func imageFromSource(_ source: MediaSourceProxy?) -> UIImage? {
|
func imageFromSource(_ source: MediaSourceProxy?) -> UIImage? {
|
||||||
imageFromSource(source, size: nil)
|
imageFromSource(source, size: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadImageFromSource(_ source: MediaSourceProxy) async -> Result<UIImage, MediaProviderError> {
|
|
||||||
await loadImageFromSource(source, size: nil)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,3 @@ protocol MediaLoaderProtocol {
|
|||||||
|
|
||||||
func loadMediaFileForSource(_ source: MediaSourceProxy, body: String?) async throws -> MediaFileHandleProxy
|
func loadMediaFileForSource(_ source: MediaSourceProxy, body: String?) async throws -> MediaFileHandleProxy
|
||||||
}
|
}
|
||||||
|
|
||||||
extension MediaLoaderProtocol {
|
|
||||||
func loadMediaFileForSource(_ source: MediaSourceProxy) async throws -> MediaFileHandleProxy {
|
|
||||||
try await loadMediaFileForSource(source, body: nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ struct MediaSourceProxy: Hashable {
|
|||||||
|
|
||||||
// MARK: - Hashable
|
// MARK: - Hashable
|
||||||
|
|
||||||
public static func == (lhs: MediaSourceProxy, rhs: MediaSourceProxy) -> Bool {
|
static func == (lhs: MediaSourceProxy, rhs: MediaSourceProxy) -> Bool {
|
||||||
lhs.url == rhs.url
|
lhs.url == rhs.url
|
||||||
}
|
}
|
||||||
|
|
||||||
public func hash(into hasher: inout Hasher) {
|
func hash(into hasher: inout Hasher) {
|
||||||
hasher.combine(url)
|
hasher.combine(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ enum NotificationConstants {
|
|||||||
static let unreadCount = "unread_count"
|
static let unreadCount = "unread_count"
|
||||||
static let pusherNotificationClientIdentifier = "pusher_notification_client_identifier"
|
static let pusherNotificationClientIdentifier = "pusher_notification_client_identifier"
|
||||||
static let receiverIdentifier = "receiver_id"
|
static let receiverIdentifier = "receiver_id"
|
||||||
static let notificationIdentifier = "notification_identifier"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Category {
|
enum Category {
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
|
|||||||
notificationItem.roomInfo.displayName
|
notificationItem.roomInfo.displayName
|
||||||
}
|
}
|
||||||
|
|
||||||
var roomCanonicalAlias: String? {
|
|
||||||
notificationItem.roomInfo.canonicalAlias
|
|
||||||
}
|
|
||||||
|
|
||||||
var isRoomDirect: Bool {
|
var isRoomDirect: Bool {
|
||||||
notificationItem.roomInfo.isDirect
|
notificationItem.roomInfo.isDirect
|
||||||
}
|
}
|
||||||
@@ -97,26 +93,16 @@ struct EmptyNotificationItemProxy: NotificationItemProxyProtocol {
|
|||||||
|
|
||||||
var senderDisplayName: String? { nil }
|
var senderDisplayName: String? { nil }
|
||||||
|
|
||||||
var senderAvatarURL: String? { nil }
|
|
||||||
|
|
||||||
var roomDisplayName: String { "" }
|
var roomDisplayName: String { "" }
|
||||||
|
|
||||||
var roomCanonicalAlias: String? { nil }
|
|
||||||
|
|
||||||
var roomAvatarURL: String? { nil }
|
|
||||||
|
|
||||||
var isNoisy: Bool { false }
|
var isNoisy: Bool { false }
|
||||||
|
|
||||||
var isRoomDirect: Bool { false }
|
var isRoomDirect: Bool { false }
|
||||||
|
|
||||||
var isRoomEncrypted: Bool? { nil }
|
|
||||||
|
|
||||||
var senderAvatarMediaSource: MediaSourceProxy? { nil }
|
var senderAvatarMediaSource: MediaSourceProxy? { nil }
|
||||||
|
|
||||||
var roomAvatarMediaSource: MediaSourceProxy? { nil }
|
var roomAvatarMediaSource: MediaSourceProxy? { nil }
|
||||||
|
|
||||||
var notificationIdentifier: String { "" }
|
|
||||||
|
|
||||||
var roomJoinedMembers: Int { 0 }
|
var roomJoinedMembers: Int { 0 }
|
||||||
|
|
||||||
var hasMention: Bool { false }
|
var hasMention: Bool { false }
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ protocol NotificationItemProxyProtocol {
|
|||||||
|
|
||||||
var roomDisplayName: String { get }
|
var roomDisplayName: String { get }
|
||||||
|
|
||||||
var roomCanonicalAlias: String? { get }
|
|
||||||
|
|
||||||
var roomAvatarMediaSource: MediaSourceProxy? { get }
|
var roomAvatarMediaSource: MediaSourceProxy? { get }
|
||||||
|
|
||||||
var roomJoinedMembers: Int { get }
|
var roomJoinedMembers: Int { get }
|
||||||
|
|||||||
@@ -93,10 +93,6 @@ final class NotificationSettingsProxy: NotificationSettingsProxyProtocol {
|
|||||||
await updatedSettings()
|
await updatedSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
func containsKeywordsRules() async -> Bool {
|
|
||||||
await notificationSettings.containsKeywordsRules()
|
|
||||||
}
|
|
||||||
|
|
||||||
func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool) async throws {
|
func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool) async throws {
|
||||||
let backgroundTask = await backgroundTaskService?.startBackgroundTask(withName: "unmuteRoom")
|
let backgroundTask = await backgroundTaskService?.startBackgroundTask(withName: "unmuteRoom")
|
||||||
defer { backgroundTask?.stop() }
|
defer { backgroundTask?.stop() }
|
||||||
@@ -117,18 +113,6 @@ final class NotificationSettingsProxy: NotificationSettingsProxyProtocol {
|
|||||||
await updatedSettings()
|
await updatedSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
func isUserMentionEnabled() async throws -> Bool {
|
|
||||||
try await notificationSettings.isUserMentionEnabled()
|
|
||||||
}
|
|
||||||
|
|
||||||
func setUserMentionEnabled(enabled: Bool) async throws {
|
|
||||||
let backgroundTask = await backgroundTaskService?.startBackgroundTask(withName: "setUserMentionEnabled")
|
|
||||||
defer { backgroundTask?.stop() }
|
|
||||||
|
|
||||||
try await notificationSettings.setUserMentionEnabled(enabled: enabled)
|
|
||||||
await updatedSettings()
|
|
||||||
}
|
|
||||||
|
|
||||||
func isCallEnabled() async throws -> Bool {
|
func isCallEnabled() async throws -> Bool {
|
||||||
try await notificationSettings.isCallEnabled()
|
try await notificationSettings.isCallEnabled()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,12 +32,9 @@ protocol NotificationSettingsProxyProtocol {
|
|||||||
func getDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool) async -> RoomNotificationModeProxy
|
func getDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool) async -> RoomNotificationModeProxy
|
||||||
func setDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool, mode: RoomNotificationModeProxy) async throws
|
func setDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool, mode: RoomNotificationModeProxy) async throws
|
||||||
func restoreDefaultNotificationMode(roomId: String) async throws
|
func restoreDefaultNotificationMode(roomId: String) async throws
|
||||||
func containsKeywordsRules() async -> Bool
|
|
||||||
func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool) async throws
|
func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool) async throws
|
||||||
func isRoomMentionEnabled() async throws -> Bool
|
func isRoomMentionEnabled() async throws -> Bool
|
||||||
func setRoomMentionEnabled(enabled: Bool) async throws
|
func setRoomMentionEnabled(enabled: Bool) async throws
|
||||||
func isUserMentionEnabled() async throws -> Bool
|
|
||||||
func setUserMentionEnabled(enabled: Bool) async throws
|
|
||||||
func isCallEnabled() async throws -> Bool
|
func isCallEnabled() async throws -> Bool
|
||||||
func setCallEnabled(enabled: Bool) async throws
|
func setCallEnabled(enabled: Bool) async throws
|
||||||
func isInviteForMeEnabled() async throws -> Bool
|
func isInviteForMeEnabled() async throws -> Bool
|
||||||
|
|||||||
@@ -39,12 +39,6 @@ final class RoomMemberProxy: RoomMemberProxyProtocol {
|
|||||||
|
|
||||||
lazy var membership = member.membership()
|
lazy var membership = member.membership()
|
||||||
|
|
||||||
lazy var isNameAmbiguous = member.isNameAmbiguous()
|
|
||||||
|
|
||||||
lazy var powerLevel = Int(member.powerLevel())
|
|
||||||
|
|
||||||
lazy var normalizedPowerLevel = Int(member.normalizedPowerLevel())
|
|
||||||
|
|
||||||
lazy var isAccountOwner = member.isAccountUser()
|
lazy var isAccountOwner = member.isAccountUser()
|
||||||
|
|
||||||
lazy var isIgnored = member.isIgnored()
|
lazy var isIgnored = member.isIgnored()
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ protocol RoomMemberProxyProtocol: AnyObject {
|
|||||||
var displayName: String? { get }
|
var displayName: String? { get }
|
||||||
var avatarURL: URL? { get }
|
var avatarURL: URL? { get }
|
||||||
var membership: MembershipState { get }
|
var membership: MembershipState { get }
|
||||||
var isNameAmbiguous: Bool { get }
|
|
||||||
var powerLevel: Int { get }
|
|
||||||
var normalizedPowerLevel: Int { get }
|
|
||||||
var isAccountOwner: Bool { get }
|
var isAccountOwner: Bool { get }
|
||||||
var isIgnored: Bool { get }
|
var isIgnored: Bool { get }
|
||||||
var canInviteUsers: Bool { get }
|
var canInviteUsers: Bool { get }
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
private var sendMessageBackgroundTask: BackgroundTaskProtocol?
|
private var sendMessageBackgroundTask: BackgroundTaskProtocol?
|
||||||
|
|
||||||
private(set) var displayName: String?
|
private(set) var displayName: String?
|
||||||
|
// periphery:ignore - required for instance retention in the rust codebase
|
||||||
private var roomInfoObservationToken: TaskHandle?
|
private var roomInfoObservationToken: TaskHandle?
|
||||||
private var subscribedForUpdates = false
|
private var subscribedForUpdates = false
|
||||||
|
|
||||||
@@ -104,10 +105,6 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
room.topic()
|
room.topic()
|
||||||
}
|
}
|
||||||
|
|
||||||
var isJoined: Bool {
|
|
||||||
room.membership() == .joined
|
|
||||||
}
|
|
||||||
|
|
||||||
var membership: Membership {
|
var membership: Membership {
|
||||||
room.membership()
|
room.membership()
|
||||||
}
|
}
|
||||||
@@ -128,10 +125,6 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
(try? room.isEncrypted()) ?? false
|
(try? room.isEncrypted()) ?? false
|
||||||
}
|
}
|
||||||
|
|
||||||
var isTombstoned: Bool {
|
|
||||||
room.isTombstoned()
|
|
||||||
}
|
|
||||||
|
|
||||||
var hasOngoingCall: Bool {
|
var hasOngoingCall: Bool {
|
||||||
room.hasActiveRoomCall()
|
room.hasActiveRoomCall()
|
||||||
}
|
}
|
||||||
@@ -140,10 +133,6 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
room.canonicalAlias()
|
room.canonicalAlias()
|
||||||
}
|
}
|
||||||
|
|
||||||
var alternativeAliases: [String] {
|
|
||||||
room.alternativeAliases()
|
|
||||||
}
|
|
||||||
|
|
||||||
var hasUnreadNotifications: Bool {
|
var hasUnreadNotifications: Bool {
|
||||||
roomListItem.hasUnreadNotifications()
|
roomListItem.hasUnreadNotifications()
|
||||||
}
|
}
|
||||||
@@ -164,36 +153,6 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
Int(room.activeMembersCount())
|
Int(room.activeMembersCount())
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadAvatarURLForUserId(_ userId: String) async -> Result<URL?, RoomProxyError> {
|
|
||||||
do {
|
|
||||||
guard let urlString = try await Task.dispatch(on: lowPriorityDispatchQueue, {
|
|
||||||
try self.room.memberAvatarUrl(userId: userId)
|
|
||||||
}) else {
|
|
||||||
return .success(nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
guard let avatarURL = URL(string: urlString) else {
|
|
||||||
MXLog.error("Invalid avatar URL string: \(String(describing: urlString))")
|
|
||||||
return .failure(.failedRetrievingMemberAvatarURL)
|
|
||||||
}
|
|
||||||
|
|
||||||
return .success(avatarURL)
|
|
||||||
} catch {
|
|
||||||
return .failure(.failedRetrievingMemberAvatarURL)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func loadDisplayNameForUserId(_ userId: String) async -> Result<String?, RoomProxyError> {
|
|
||||||
do {
|
|
||||||
let displayName = try await Task.dispatch(on: lowPriorityDispatchQueue) {
|
|
||||||
try self.room.memberDisplayName(userId: userId)
|
|
||||||
}
|
|
||||||
return .success(displayName)
|
|
||||||
} catch {
|
|
||||||
return .failure(.failedRetrievingMemberDisplayName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func redact(_ eventID: String) async -> Result<Void, RoomProxyError> {
|
func redact(_ eventID: String) async -> Result<Void, RoomProxyError> {
|
||||||
sendMessageBackgroundTask = await backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
sendMessageBackgroundTask = await backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
||||||
defer {
|
defer {
|
||||||
@@ -290,16 +249,6 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func inviter() async -> RoomMemberProxyProtocol? {
|
|
||||||
let inviter = await Task.dispatch(on: .global()) {
|
|
||||||
self.room.inviter()
|
|
||||||
}
|
|
||||||
|
|
||||||
return inviter.map {
|
|
||||||
RoomMemberProxy(member: $0, backgroundTaskService: self.backgroundTaskService)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func rejectInvitation() async -> Result<Void, RoomProxyError> {
|
func rejectInvitation() async -> Result<Void, RoomProxyError> {
|
||||||
await Task.dispatch(on: .global()) {
|
await Task.dispatch(on: .global()) {
|
||||||
do {
|
do {
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import Foundation
|
|||||||
import MatrixRustSDK
|
import MatrixRustSDK
|
||||||
|
|
||||||
enum RoomProxyError: Error, Equatable {
|
enum RoomProxyError: Error, Equatable {
|
||||||
case failedRetrievingMemberAvatarURL
|
|
||||||
case failedRetrievingMemberDisplayName
|
|
||||||
case failedRedactingEvent
|
case failedRedactingEvent
|
||||||
case failedReportingContent
|
case failedReportingContent
|
||||||
case failedRetrievingMember
|
case failedRetrievingMember
|
||||||
@@ -46,11 +44,9 @@ protocol RoomProxyProtocol {
|
|||||||
var isPublic: Bool { get }
|
var isPublic: Bool { get }
|
||||||
var isSpace: Bool { get }
|
var isSpace: Bool { get }
|
||||||
var isEncrypted: Bool { get }
|
var isEncrypted: Bool { get }
|
||||||
var isTombstoned: Bool { get }
|
|
||||||
var membership: Membership { get }
|
var membership: Membership { get }
|
||||||
var hasOngoingCall: Bool { get }
|
var hasOngoingCall: Bool { get }
|
||||||
var canonicalAlias: String? { get }
|
var canonicalAlias: String? { get }
|
||||||
var alternativeAliases: [String] { get }
|
|
||||||
var hasUnreadNotifications: Bool { get }
|
var hasUnreadNotifications: Bool { get }
|
||||||
var ownUserID: String { get }
|
var ownUserID: String { get }
|
||||||
|
|
||||||
@@ -63,8 +59,6 @@ protocol RoomProxyProtocol {
|
|||||||
|
|
||||||
var members: CurrentValuePublisher<[RoomMemberProxyProtocol], Never> { get }
|
var members: CurrentValuePublisher<[RoomMemberProxyProtocol], Never> { get }
|
||||||
|
|
||||||
var invitedMembersCount: Int { get }
|
|
||||||
|
|
||||||
var joinedMembersCount: Int { get }
|
var joinedMembersCount: Int { get }
|
||||||
|
|
||||||
var activeMembersCount: Int { get }
|
var activeMembersCount: Int { get }
|
||||||
@@ -73,15 +67,8 @@ protocol RoomProxyProtocol {
|
|||||||
|
|
||||||
var timeline: TimelineProxyProtocol { get }
|
var timeline: TimelineProxyProtocol { get }
|
||||||
|
|
||||||
/// A timeline providing just polls related events
|
|
||||||
var pollHistoryTimeline: TimelineProxyProtocol { get }
|
|
||||||
|
|
||||||
func subscribeForUpdates() async
|
func subscribeForUpdates() async
|
||||||
|
|
||||||
func loadAvatarURLForUserId(_ userId: String) async -> Result<URL?, RoomProxyError>
|
|
||||||
|
|
||||||
func loadDisplayNameForUserId(_ userId: String) async -> Result<String?, RoomProxyError>
|
|
||||||
|
|
||||||
func redact(_ eventID: String) async -> Result<Void, RoomProxyError>
|
func redact(_ eventID: String) async -> Result<Void, RoomProxyError>
|
||||||
|
|
||||||
func reportContent(_ eventID: String, reason: String?) async -> Result<Void, RoomProxyError>
|
func reportContent(_ eventID: String, reason: String?) async -> Result<Void, RoomProxyError>
|
||||||
@@ -94,8 +81,6 @@ protocol RoomProxyProtocol {
|
|||||||
|
|
||||||
func getMember(userID: String) async -> Result<RoomMemberProxyProtocol, RoomProxyError>
|
func getMember(userID: String) async -> Result<RoomMemberProxyProtocol, RoomProxyError>
|
||||||
|
|
||||||
func inviter() async -> RoomMemberProxyProtocol?
|
|
||||||
|
|
||||||
func rejectInvitation() async -> Result<Void, RoomProxyError>
|
func rejectInvitation() async -> Result<Void, RoomProxyError>
|
||||||
|
|
||||||
func acceptInvitation() async -> Result<Void, RoomProxyError>
|
func acceptInvitation() async -> Result<Void, RoomProxyError>
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ struct RoomEventStringBuilder {
|
|||||||
|
|
||||||
let messageType = messageContent.msgtype()
|
let messageType = messageContent.msgtype()
|
||||||
return messageEventStringBuilder.buildAttributedString(for: messageType, senderDisplayName: senderDisplayName, prefixWithSenderName: true)
|
return messageEventStringBuilder.buildAttributedString(for: messageType, senderDisplayName: senderDisplayName, prefixWithSenderName: true)
|
||||||
case .state(let stateKey, let state):
|
case .state(_, let state):
|
||||||
return stateEventStringBuilder
|
return stateEventStringBuilder
|
||||||
.buildString(for: state, stateKey: stateKey, sender: sender, isOutgoing: isOutgoing)
|
.buildString(for: state, sender: sender, isOutgoing: isOutgoing)
|
||||||
.map(AttributedString.init)
|
.map(AttributedString.init)
|
||||||
case .roomMembership(let userID, let change):
|
case .roomMembership(let userID, let change):
|
||||||
return stateEventStringBuilder
|
return stateEventStringBuilder
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ import WysiwygComposer
|
|||||||
struct IntentionalMentions: Equatable {
|
struct IntentionalMentions: Equatable {
|
||||||
let userIDs: Set<String>
|
let userIDs: Set<String>
|
||||||
let atRoom: Bool
|
let atRoom: Bool
|
||||||
|
|
||||||
static var empty: Self {
|
|
||||||
IntentionalMentions(userIDs: [], atRoom: false)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension IntentionalMentions {
|
extension IntentionalMentions {
|
||||||
|
|||||||
+2
-3
@@ -14,15 +14,14 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// periphery:ignore:all
|
||||||
|
|
||||||
import Combine
|
import Combine
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
||||||
/// An array of timeline item arrays that will be inserted in order for each back pagination request.
|
/// An array of timeline item arrays that will be inserted in order for each back pagination request.
|
||||||
var backPaginationResponses: [[RoomTimelineItemProtocol]] = []
|
var backPaginationResponses: [[RoomTimelineItemProtocol]] = []
|
||||||
/// The time delay added to each back pagination request.
|
|
||||||
var backPaginationDelay: Duration = .milliseconds(500)
|
|
||||||
|
|
||||||
/// An array of timeline items that will be appended in order when ``simulateIncomingItems()`` is called.
|
/// An array of timeline items that will be appended in order when ``simulateIncomingItems()`` is called.
|
||||||
var incomingItems: [RoomTimelineItemProtocol] = []
|
var incomingItems: [RoomTimelineItemProtocol] = []
|
||||||
|
|
||||||
|
|||||||
+1
-12
@@ -18,23 +18,12 @@ struct LocationRoomTimelineItemContent: Hashable {
|
|||||||
let body: String
|
let body: String
|
||||||
let geoURI: GeoURI?
|
let geoURI: GeoURI?
|
||||||
let description: String?
|
let description: String?
|
||||||
let zoomLevel: UInt8?
|
|
||||||
let asset: AssetType?
|
|
||||||
|
|
||||||
enum AssetType {
|
|
||||||
case sender
|
|
||||||
case pin
|
|
||||||
}
|
|
||||||
|
|
||||||
init(body: String,
|
init(body: String,
|
||||||
geoURI: GeoURI? = nil,
|
geoURI: GeoURI? = nil,
|
||||||
description: String? = nil,
|
description: String? = nil) {
|
||||||
zoomLevel: UInt8? = nil,
|
|
||||||
asset: AssetType? = nil) {
|
|
||||||
self.body = body
|
self.body = body
|
||||||
self.geoURI = geoURI
|
self.geoURI = geoURI
|
||||||
self.description = description
|
self.description = description
|
||||||
self.zoomLevel = zoomLevel
|
|
||||||
self.asset = asset
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ struct RoomStateEventStringBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func buildString(for state: OtherState, stateKey: String?, sender: TimelineItemSender, isOutgoing: Bool) -> String? {
|
func buildString(for state: OtherState, sender: TimelineItemSender, isOutgoing: Bool) -> String? {
|
||||||
let senderName = sender.displayName ?? sender.id
|
let senderName = sender.displayName ?? sender.id
|
||||||
|
|
||||||
switch state {
|
switch state {
|
||||||
|
|||||||
@@ -526,9 +526,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
|||||||
private func buildLocationTimelineItemContent(_ locationContent: LocationContent) -> LocationRoomTimelineItemContent {
|
private func buildLocationTimelineItemContent(_ locationContent: LocationContent) -> LocationRoomTimelineItemContent {
|
||||||
LocationRoomTimelineItemContent(body: locationContent.body,
|
LocationRoomTimelineItemContent(body: locationContent.body,
|
||||||
geoURI: .init(string: locationContent.geoUri),
|
geoURI: .init(string: locationContent.geoUri),
|
||||||
description: locationContent.description,
|
description: locationContent.description)
|
||||||
zoomLevel: locationContent.zoomLevel,
|
|
||||||
asset: locationContent.asset.map { .init(assetType: $0) })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func buildFileTimelineItemContent(_ messageContent: FileMessageContent) -> FileRoomTimelineItemContent {
|
private func buildFileTimelineItemContent(_ messageContent: FileMessageContent) -> FileRoomTimelineItemContent {
|
||||||
@@ -568,7 +566,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
|||||||
state: OtherState,
|
state: OtherState,
|
||||||
stateKey: String,
|
stateKey: String,
|
||||||
isOutgoing: Bool) -> RoomTimelineItemProtocol? {
|
isOutgoing: Bool) -> RoomTimelineItemProtocol? {
|
||||||
guard let text = stateEventStringBuilder.buildString(for: state, stateKey: stateKey, sender: eventItemProxy.sender, isOutgoing: isOutgoing) else { return nil }
|
guard let text = stateEventStringBuilder.buildString(for: state, sender: eventItemProxy.sender, isOutgoing: isOutgoing) else { return nil }
|
||||||
return buildStateTimelineItem(for: eventItemProxy, text: text, isOutgoing: isOutgoing)
|
return buildStateTimelineItem(for: eventItemProxy, text: text, isOutgoing: isOutgoing)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,17 +678,6 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private extension LocationRoomTimelineItemContent.AssetType {
|
|
||||||
init(assetType: MatrixRustSDK.AssetType) {
|
|
||||||
switch assetType {
|
|
||||||
case .sender:
|
|
||||||
self = .sender
|
|
||||||
case .pin:
|
|
||||||
self = .pin
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension Poll.Kind {
|
extension Poll.Kind {
|
||||||
init(pollKind: MatrixRustSDK.PollKind) {
|
init(pollKind: MatrixRustSDK.PollKind) {
|
||||||
switch pollKind {
|
switch pollKind {
|
||||||
|
|||||||
@@ -786,8 +786,8 @@ class MockScreen: Identifiable {
|
|||||||
ServiceLocator.shared.settings.seenInvites = Set([RoomSummary].mockInvites.dropFirst(1).compactMap(\.id))
|
ServiceLocator.shared.settings.seenInvites = Set([RoomSummary].mockInvites.dropFirst(1).compactMap(\.id))
|
||||||
let navigationStackCoordinator = NavigationStackCoordinator()
|
let navigationStackCoordinator = NavigationStackCoordinator()
|
||||||
let clientProxy = MockClientProxy(userID: "@mock:client.com")
|
let clientProxy = MockClientProxy(userID: "@mock:client.com")
|
||||||
clientProxy.roomForIdentifierMocks["someAwesomeRoomId1"] = .init(with: .init(displayName: "First room", inviter: .mockCharlie))
|
clientProxy.roomForIdentifierMocks["someAwesomeRoomId1"] = .init(with: .init(displayName: "First room"))
|
||||||
clientProxy.roomForIdentifierMocks["someAwesomeRoomId2"] = .init(with: .init(displayName: "Second room", inviter: .mockCharlie))
|
clientProxy.roomForIdentifierMocks["someAwesomeRoomId2"] = .init(with: .init(displayName: "Second room"))
|
||||||
let summaryProvider = MockRoomSummaryProvider(state: .loaded(.mockInvites))
|
let summaryProvider = MockRoomSummaryProvider(state: .loaded(.mockInvites))
|
||||||
clientProxy.inviteSummaryProvider = summaryProvider
|
clientProxy.inviteSummaryProvider = summaryProvider
|
||||||
|
|
||||||
@@ -798,8 +798,8 @@ class MockScreen: Identifiable {
|
|||||||
ServiceLocator.shared.settings.seenInvites = Set([RoomSummary].mockInvites.compactMap(\.id))
|
ServiceLocator.shared.settings.seenInvites = Set([RoomSummary].mockInvites.compactMap(\.id))
|
||||||
let navigationStackCoordinator = NavigationStackCoordinator()
|
let navigationStackCoordinator = NavigationStackCoordinator()
|
||||||
let clientProxy = MockClientProxy(userID: "@mock:client.com")
|
let clientProxy = MockClientProxy(userID: "@mock:client.com")
|
||||||
clientProxy.roomForIdentifierMocks["someAwesomeRoomId1"] = .init(with: .init(displayName: "First room", inviter: .mockCharlie))
|
clientProxy.roomForIdentifierMocks["someAwesomeRoomId1"] = .init(with: .init(displayName: "First room"))
|
||||||
clientProxy.roomForIdentifierMocks["someAwesomeRoomId2"] = .init(with: .init(displayName: "Second room", inviter: .mockCharlie))
|
clientProxy.roomForIdentifierMocks["someAwesomeRoomId2"] = .init(with: .init(displayName: "Second room"))
|
||||||
let summaryProvider = MockRoomSummaryProvider(state: .loaded(.mockInvites))
|
let summaryProvider = MockRoomSummaryProvider(state: .loaded(.mockInvites))
|
||||||
clientProxy.inviteSummaryProvider = summaryProvider
|
clientProxy.inviteSummaryProvider = summaryProvider
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ enum NSELogger {
|
|||||||
|
|
||||||
/// Formatted memory footprint for debugging purposes
|
/// Formatted memory footprint for debugging purposes
|
||||||
/// - Returns: Memory footprint in MBs as a readable string
|
/// - Returns: Memory footprint in MBs as a readable string
|
||||||
public static var formattedMemoryFootprint: String {
|
static var formattedMemoryFootprint: String {
|
||||||
let usedBytes = UInt64(memoryFootprint ?? 0)
|
let usedBytes = UInt64(memoryFootprint ?? 0)
|
||||||
let usedMB = Double(usedBytes) / 1024 / 1024
|
let usedMB = Double(usedBytes) / 1024 / 1024
|
||||||
guard let formattedStr = numberFormatter.string(from: NSNumber(value: usedMB)) else {
|
guard let formattedStr = numberFormatter.string(from: NSNumber(value: usedMB)) else {
|
||||||
|
|||||||
@@ -74,40 +74,6 @@ class RoomScreenUITests: XCTestCase {
|
|||||||
try await app.assertScreenshot(.roomSmallTimelineLargePagination)
|
try await app.assertScreenshot(.roomSmallTimelineLargePagination)
|
||||||
}
|
}
|
||||||
|
|
||||||
func disabled_testTimelineLayoutInMiddle() async throws {
|
|
||||||
let client = try UITestsSignalling.Client(mode: .tests)
|
|
||||||
|
|
||||||
let app = Application.launch(.roomLayoutMiddle)
|
|
||||||
|
|
||||||
await client.waitForApp()
|
|
||||||
defer { try? client.stop() }
|
|
||||||
|
|
||||||
try await Task.sleep(for: .seconds(1)) // Allow the table to settle
|
|
||||||
// Given a timeline that is neither at the top nor the bottom.
|
|
||||||
app.swipeDown()
|
|
||||||
try await Task.sleep(for: .seconds(1)) // Allow the table to settle
|
|
||||||
try await app.assertScreenshot(.roomLayoutMiddle, step: 0) // Assert initial state for comparison.
|
|
||||||
|
|
||||||
// When a back pagination occurs.
|
|
||||||
try await performOperation(.paginate, using: client)
|
|
||||||
|
|
||||||
// Then the UI should remain unchanged.
|
|
||||||
try await app.assertScreenshot(.roomLayoutMiddle, step: 0)
|
|
||||||
|
|
||||||
// When an incoming message arrives
|
|
||||||
try await performOperation(.incomingMessage, using: client)
|
|
||||||
|
|
||||||
// Then the UI should still remain unchanged.
|
|
||||||
|
|
||||||
try await app.assertScreenshot(.roomLayoutMiddle, step: 0)
|
|
||||||
|
|
||||||
// When the keyboard appears for the message composer.
|
|
||||||
try await tapMessageComposer(in: app)
|
|
||||||
|
|
||||||
// Then the timeline scroll offset should remain unchanged.
|
|
||||||
try await app.assertScreenshot(.roomLayoutMiddle, step: 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func testTimelineLayoutAtTop() async throws {
|
func testTimelineLayoutAtTop() async throws {
|
||||||
let client = try UITestsSignalling.Client(mode: .tests)
|
let client = try UITestsSignalling.Client(mode: .tests)
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import XCTest
|
|||||||
@MainActor
|
@MainActor
|
||||||
class InviteUsersScreenViewModelTests: XCTestCase {
|
class InviteUsersScreenViewModelTests: XCTestCase {
|
||||||
var viewModel: InviteUsersScreenViewModelProtocol!
|
var viewModel: InviteUsersScreenViewModelProtocol!
|
||||||
var clientProxy: MockClientProxy!
|
|
||||||
var userDiscoveryService: UserDiscoveryServiceMock!
|
var userDiscoveryService: UserDiscoveryServiceMock!
|
||||||
|
|
||||||
private var cancellables = Set<AnyCancellable>()
|
private var cancellables = Set<AnyCancellable>()
|
||||||
@@ -96,7 +95,6 @@ class InviteUsersScreenViewModelTests: XCTestCase {
|
|||||||
|
|
||||||
private func setupWithRoomType(roomType: InviteUsersScreenRoomType) {
|
private func setupWithRoomType(roomType: InviteUsersScreenRoomType) {
|
||||||
let usersSubject = CurrentValueSubject<[UserProfileProxy], Never>([])
|
let usersSubject = CurrentValueSubject<[UserProfileProxy], Never>([])
|
||||||
clientProxy = .init(userID: "")
|
|
||||||
userDiscoveryService = UserDiscoveryServiceMock()
|
userDiscoveryService = UserDiscoveryServiceMock()
|
||||||
userDiscoveryService.fetchSuggestionsReturnValue = .success([])
|
userDiscoveryService.fetchSuggestionsReturnValue = .success([])
|
||||||
userDiscoveryService.searchProfilesWithReturnValue = .success([])
|
userDiscoveryService.searchProfilesWithReturnValue = .success([])
|
||||||
|
|||||||
@@ -50,11 +50,6 @@ struct LayoutSubviewsMock: Equatable, RandomAccessCollection {
|
|||||||
subscript(bounds: Range<Int>) -> LayoutSubviewsMock {
|
subscript(bounds: Range<Int>) -> LayoutSubviewsMock {
|
||||||
LayoutSubviewsMock(subviews: Array(subviews[bounds]))
|
LayoutSubviewsMock(subviews: Array(subviews[bounds]))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the subview proxies with the specified indicies.
|
|
||||||
subscript<S>(indices: S) -> LayoutSubviewsMock where S: Sequence, S.Element == Int {
|
|
||||||
LayoutSubviewsMock(subviews: Array(indices.map { subviews[$0] }))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A mock of the SwiftUI `LayoutSubview` struct
|
/// A mock of the SwiftUI `LayoutSubview` struct
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ class NotificationSettingsScreenViewModelTests: XCTestCase {
|
|||||||
private var viewModel: NotificationSettingsScreenViewModelProtocol!
|
private var viewModel: NotificationSettingsScreenViewModelProtocol!
|
||||||
private var context: NotificationSettingsScreenViewModelType.Context!
|
private var context: NotificationSettingsScreenViewModelType.Context!
|
||||||
private var appSettings: AppSettings!
|
private var appSettings: AppSettings!
|
||||||
private var userSession: UserSessionProtocol!
|
|
||||||
private var userNotificationCenter: UserNotificationCenterMock!
|
private var userNotificationCenter: UserNotificationCenterMock!
|
||||||
private var notificationSettingsProxy: NotificationSettingsProxyMock!
|
private var notificationSettingsProxy: NotificationSettingsProxyMock!
|
||||||
|
|
||||||
@@ -39,13 +38,7 @@ class NotificationSettingsScreenViewModelTests: XCTestCase {
|
|||||||
notificationSettingsProxy.isRoomMentionEnabledReturnValue = true
|
notificationSettingsProxy.isRoomMentionEnabledReturnValue = true
|
||||||
notificationSettingsProxy.isCallEnabledReturnValue = true
|
notificationSettingsProxy.isCallEnabledReturnValue = true
|
||||||
|
|
||||||
let clientProxy = MockClientProxy(userID: "@a:b.com")
|
viewModel = NotificationSettingsScreenViewModel(appSettings: appSettings,
|
||||||
userSession = MockUserSession(clientProxy: clientProxy,
|
|
||||||
mediaProvider: MockMediaProvider(),
|
|
||||||
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
|
|
||||||
|
|
||||||
viewModel = NotificationSettingsScreenViewModel(userSession: userSession,
|
|
||||||
appSettings: appSettings,
|
|
||||||
userNotificationCenter: userNotificationCenter,
|
userNotificationCenter: userNotificationCenter,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy,
|
||||||
isModallyPresented: false)
|
isModallyPresented: false)
|
||||||
|
|||||||
@@ -132,13 +132,3 @@ class RoomDetailsEditScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: userIndicatorController)
|
userIndicatorController: userIndicatorController)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private extension ImageInfo {
|
|
||||||
static let mock: ImageInfo = .init(height: nil,
|
|
||||||
width: nil,
|
|
||||||
mimetype: nil,
|
|
||||||
size: nil,
|
|
||||||
thumbnailInfo: nil,
|
|
||||||
thumbnailSource: nil,
|
|
||||||
blurhash: nil)
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user