Removing dead code part 2 (#2235)

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
Mauro 2023-12-15 20:16:16 +01:00 committed by GitHub
parent 2f88d39789
commit 123164f398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
91 changed files with 64 additions and 694 deletions

View File

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 56;
objects = {
/* Begin PBXAggregateTarget section */
@ -29,7 +29,6 @@
02D8DF8EB7537EB4E9019DDB /* EventBasedTimelineItemProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 218AB05B4E3889731959C5F1 /* EventBasedTimelineItemProtocol.swift */; };
02F4FAE40AF63A1941FD3BBA /* NotificationCenterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B7F8EE25775DE2A305CBB5 /* NotificationCenterProtocol.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 */; };
044DD8F80231BC30570F7965 /* UserDiscoveryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AAD845E53B0C8B5E0812C2 /* UserDiscoveryService.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 */; };
7A642EE5F1ADC5D520F21924 /* MediaProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85EB16E7FE59A947CA441531 /* MediaProviderProtocol.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 */; };
7B5DAB915357BE596529BF25 /* MapTilerStaticMapProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20872C3887F835958CE2F1D0 /* MapTilerStaticMapProtocol.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>"; };
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>"; };
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>"; };
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>"; };
@ -1110,7 +1108,7 @@
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>"; };
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>"; };
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>"; };
@ -1531,7 +1529,7 @@
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>"; };
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>"; };
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>"; };
@ -1666,7 +1664,7 @@
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>"; };
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>"; };
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>"; };
@ -1717,7 +1715,6 @@
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>"; };
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>"; };
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>"; };
@ -1771,7 +1768,7 @@
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>"; };
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>"; };
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>"; };
@ -1833,7 +1830,6 @@
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>"; };
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>"; };
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>"; };
@ -1876,7 +1872,7 @@
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>"; };
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>"; };
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>"; };
@ -1892,7 +1888,7 @@
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>"; };
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>"; };
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>"; };
@ -2730,7 +2726,6 @@
7FB2253D36E81E045E1CB432 /* Duration.swift */,
260004737C573A56FA01E86E /* Encodable.swift */,
04DF593C3F7AF4B2FBAEB05D /* FileManager.swift */,
E26747B3154A5DBC3A7E24A5 /* Image.swift */,
4E2245243369B99216C7D84E /* ImageCache.swift */,
045253F9967A535EE5B16691 /* Label.swift */,
C14D83B2B7CD5501A0089EFC /* LayoutDirection.swift */,
@ -4220,7 +4215,6 @@
B81B6170DB690013CEB646F4 /* MapLibreModels.swift */,
592A35163B0749C66BFD6186 /* MapLibreStaticMapView.swift */,
E062C1750EFC8627DE4CAB8E /* MapTilerAuthorization.swift */,
C23B3FAD8B23C421BC0D1B1E /* MapTilerGeoCodingServiceProtocol.swift */,
1A4D29F2683F5772AC72406F /* MapTilerStaticMap.swift */,
20872C3887F835958CE2F1D0 /* MapTilerStaticMapProtocol.swift */,
F0B9F5BC4C80543DE7228B9D /* MapTilerStyle.swift */,
@ -5442,7 +5436,6 @@
D3986615892E7CF05C86518A /* HomeScreenUserMenuButton.swift in Sources */,
DE4F8C4E0F1DB4832F09DE97 /* HomeScreenViewModel.swift in Sources */,
56F0A22972A3BB519DA2261C /* HomeScreenViewModelProtocol.swift in Sources */,
03D684A3AE85A23B3DA3B43F /* Image.swift in Sources */,
BA31448FBD9697F8CB9A83CD /* ImageCache.swift in Sources */,
85813D87DDD7F67A46BD9AF7 /* ImageProviderProtocol.swift in Sources */,
7CD16990BA843BE9ED639129 /* ImageRoomTimelineItem.swift in Sources */,
@ -5499,7 +5492,6 @@
E2DDA49BD62F03F180A42E30 /* MapLibreStaticMapView.swift in Sources */,
D181AC8FF236B7F91C0A8C28 /* MapTiler.swift in Sources */,
FCDA202B246F75BA28E10C5F /* MapTilerAuthorization.swift in Sources */,
7ABAB3A1D52B86FACF2F74CF /* MapTilerGeoCodingServiceProtocol.swift in Sources */,
D6661A94DBD97658B2ADBD6A /* MapTilerStaticMap.swift in Sources */,
7B5DAB915357BE596529BF25 /* MapTilerStaticMapProtocol.swift in Sources */,
83A4DAB181C56987C3E804FF /* MapTilerStyle.swift in Sources */,
@ -6092,9 +6084,7 @@
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = "$(MARKETING_VERSION)";
OTHER_SWIFT_FLAGS = (
"-DIS_NSE",
);
OTHER_SWIFT_FLAGS = "-DIS_NSE";
PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse";
PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)";
PRODUCT_NAME = NSE;
@ -6125,9 +6115,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = "$(MARKETING_VERSION)";
OTHER_SWIFT_FLAGS = (
"-DIS_MAIN_APP",
);
OTHER_SWIFT_FLAGS = "-DIS_MAIN_APP";
PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills";
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = "$(APP_NAME)";
@ -6153,9 +6141,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = "$(MARKETING_VERSION)";
OTHER_SWIFT_FLAGS = (
"-DIS_MAIN_APP",
);
OTHER_SWIFT_FLAGS = "-DIS_MAIN_APP";
PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills";
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = "$(APP_NAME)";
@ -6398,9 +6384,7 @@
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = "$(MARKETING_VERSION)";
OTHER_SWIFT_FLAGS = (
"-DIS_NSE",
);
OTHER_SWIFT_FLAGS = "-DIS_NSE";
PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse";
PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)";
PRODUCT_NAME = NSE;

View File

@ -144,7 +144,7 @@ final class AppSettings {
/// Any pre-defined static client registrations for OIDC issuers.
let oidcStaticRegistrations: [URL: String] = ["https://id.thirdroom.io/realms/thirdroom": "elementx"]
/// 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
/// a hard wall on the history of encrypted messages until we have key backup.

View File

@ -22,8 +22,6 @@ import SwiftUI
class NavigationSplitCoordinator: CoordinatorProtocol, ObservableObject, CustomStringConvertible {
fileprivate let placeholderModule: NavigationModule
private var cancellables = Set<AnyCancellable>()
var sidebarStackModuleCancellable: AnyCancellable?
@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
var fullScreenCoverCoordinator: (any CoordinatorProtocol)? {
fullScreenCoverModule?.coordinator
@ -502,6 +501,7 @@ class NavigationStackCoordinator: ObservableObject, CoordinatorProtocol, CustomS
}
}
// periphery:ignore - might be useful to have
// The currently presented fullscreen cover coordinator
// Fullscreen covers will be presented through the NavigationSplitCoordinator if provided
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
/// then the presentation will be proxied to the split
/// - Parameters:

View File

@ -49,6 +49,7 @@ class NavigationRootCoordinator: ObservableObject, CoordinatorProtocol, CustomSt
}
}
// periphery:ignore - might be useful to have
// The currently presented sheet coordinator
// Sheets will be presented through the NavigationSplitCoordinator if provided
var sheetCoordinator: (any CoordinatorProtocol)? {

View File

@ -254,7 +254,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
break
case (.notificationSettings, .presentGlobalNotificationSettingsScreen, .globalNotificationSettings):
presentGlobalNotificationSettingsScreen(animated: animated)
presentGlobalNotificationSettingsScreen()
case (.globalNotificationSettings, .dismissGlobalNotificationSettingsScreen, .notificationSettings):
break
@ -981,7 +981,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
}
}
private func presentGlobalNotificationSettingsScreen(animated: Bool) {
private func presentGlobalNotificationSettingsScreen() {
let navigationCoordinator = NavigationStackCoordinator()
let parameters = NotificationSettingsScreenCoordinatorParameters(navigationStackCoordinator: navigationCoordinator,
userSession: userSession,

View File

@ -813,27 +813,6 @@ class KeychainControllerMock: KeychainControllerProtocol {
setRestorationTokenForUsernameReceivedInvocations.append((restorationToken: restorationToken, forUsername: 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
var restorationTokensCallsCount = 0
@ -879,18 +858,6 @@ class KeychainControllerMock: KeychainControllerProtocol {
removeAllRestorationTokensCallsCount += 1
removeAllRestorationTokensClosure?()
}
//MARK: - resetSecrets
var resetSecretsCallsCount = 0
var resetSecretsCalled: Bool {
return resetSecretsCallsCount > 0
}
var resetSecretsClosure: (() -> Void)?
func resetSecrets() {
resetSecretsCallsCount += 1
resetSecretsClosure?()
}
//MARK: - containsPINCode
var containsPINCodeThrowableError: Error?
@ -1227,16 +1194,6 @@ class NetworkMonitorMock: NetworkMonitorProtocol {
set(value) { underlyingReachabilityPublisher = value }
}
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 {
@ -1493,23 +1450,6 @@ class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol {
restoreDefaultNotificationModeRoomIdReceivedInvocations.append(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
var unmuteRoomRoomIdIsEncryptedIsOneToOneThrowableError: Error?
@ -1571,47 +1511,6 @@ class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol {
setRoomMentionEnabledEnabledReceivedInvocations.append(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
var isCallEnabledThrowableError: Error?
@ -1746,21 +1645,6 @@ class RoomMemberProxyMock: RoomMemberProxyProtocol {
set(value) { underlyingMembership = value }
}
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 {
get { return underlyingIsAccountOwner }
set(value) { underlyingIsAccountOwner = value }
@ -1872,11 +1756,6 @@ class RoomProxyMock: RoomProxyProtocol {
set(value) { underlyingIsEncrypted = value }
}
var underlyingIsEncrypted: Bool!
var isTombstoned: Bool {
get { return underlyingIsTombstoned }
set(value) { underlyingIsTombstoned = value }
}
var underlyingIsTombstoned: Bool!
var membership: Membership {
get { return underlyingMembership }
set(value) { underlyingMembership = value }
@ -1888,7 +1767,6 @@ class RoomProxyMock: RoomProxyProtocol {
}
var underlyingHasOngoingCall: Bool!
var canonicalAlias: String?
var alternativeAliases: [String] = []
var hasUnreadNotifications: Bool {
get { return underlyingHasUnreadNotifications }
set(value) { underlyingHasUnreadNotifications = value }
@ -1908,11 +1786,6 @@ class RoomProxyMock: RoomProxyProtocol {
set(value) { underlyingMembers = value }
}
var underlyingMembers: CurrentValuePublisher<[RoomMemberProxyProtocol], Never>!
var invitedMembersCount: Int {
get { return underlyingInvitedMembersCount }
set(value) { underlyingInvitedMembersCount = value }
}
var underlyingInvitedMembersCount: Int!
var joinedMembersCount: Int {
get { return underlyingJoinedMembersCount }
set(value) { underlyingJoinedMembersCount = value }
@ -1933,11 +1806,6 @@ class RoomProxyMock: RoomProxyProtocol {
set(value) { underlyingTimeline = value }
}
var underlyingTimeline: TimelineProxyProtocol!
var pollHistoryTimeline: TimelineProxyProtocol {
get { return underlyingPollHistoryTimeline }
set(value) { underlyingPollHistoryTimeline = value }
}
var underlyingPollHistoryTimeline: TimelineProxyProtocol!
//MARK: - subscribeForUpdates
@ -1951,48 +1819,6 @@ class RoomProxyMock: RoomProxyProtocol {
subscribeForUpdatesCallsCount += 1
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
var redactCallsCount = 0
@ -2106,23 +1932,6 @@ class RoomProxyMock: RoomProxyProtocol {
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
var rejectInvitationCallsCount = 0

View File

@ -22,9 +22,6 @@ struct RoomMemberProxyMockConfiguration {
var displayName: String
var avatarURL: URL?
var membership: MembershipState
var isNameAmbiguous = false
var powerLevel = 50
var normalizedPowerLevel = 50
var isAccountOwner = false
var isIgnored = false
var canInviteUsers = false
@ -38,9 +35,6 @@ extension RoomMemberProxyMock {
displayName = configuration.displayName
avatarURL = configuration.avatarURL
membership = configuration.membership
isNameAmbiguous = configuration.isNameAmbiguous
powerLevel = configuration.powerLevel
normalizedPowerLevel = configuration.normalizedPowerLevel
isAccountOwner = configuration.isAccountOwner
isIgnored = configuration.isIgnored
canInviteUsers = configuration.canInviteUsers

View File

@ -27,7 +27,6 @@ struct RoomProxyMockConfiguration {
var isSpace = Bool.random()
var isPublic = Bool.random()
var isEncrypted = true
var isTombstoned = Bool.random()
var hasOngoingCall = false
var canonicalAlias: String?
var alternativeAliases: [String] = []
@ -40,7 +39,6 @@ struct RoomProxyMockConfiguration {
}()
var members: [RoomMemberProxyProtocol]?
var inviter: RoomMemberProxyMock?
var memberForID: RoomMemberProxyMock = .mockMe
var ownUserID = "@alice:somewhere.org"
@ -65,15 +63,12 @@ extension RoomProxyMock {
isSpace = configuration.isSpace
isPublic = configuration.isPublic
isEncrypted = configuration.isEncrypted
isTombstoned = configuration.isTombstoned
hasOngoingCall = configuration.hasOngoingCall
canonicalAlias = configuration.canonicalAlias
alternativeAliases = configuration.alternativeAliases
hasUnreadNotifications = configuration.hasUnreadNotifications
timeline = configuration.timeline
invitedMembersCount = configuration.invitedMembersCount
joinedMembersCount = configuration.joinedMembersCount
activeMembersCount = configuration.activeMembersCount
ownUserID = configuration.ownUserID
@ -83,10 +78,6 @@ extension RoomProxyMock {
} else {
members = CurrentValueSubject([]).asCurrentValuePublisher()
}
if let inviter = configuration.inviter {
inviterClosure = { inviter }
}
updateMembersClosure = { }
acceptInvitationClosure = { .success(()) }

View File

@ -95,6 +95,7 @@ extension AlertInfo {
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.
///
/// Currently this initialiser creates an alert for every error, however in the future it may be updated to filter

View File

@ -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()))
}

View File

@ -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
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] {
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? {
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))
}
}

View File

@ -41,9 +41,3 @@ extension PlatformViewVersionPredicate<ViewControllerType, UIViewController> {
.iOS(.v16, .v17)
}
}
extension PlatformViewVersionPredicate<NavigationStackType, UINavigationController> {
static var supportedVersions: Self {
.iOS(.v16, .v17)
}
}

View File

@ -160,6 +160,7 @@ enum MXLog {
// MARK: - Private
// periphery:ignore:parameters function,column
private static func createSpan(_ name: String,
level: LogLevel,
file: String = #file,
@ -177,6 +178,7 @@ enum MXLog {
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,
level: LogLevel,
file: String = #file,

View File

@ -230,15 +230,6 @@ extension MapLibreMapView {
// MARK: - MGLMapView convenient methods
private extension MGLMapView {
func removeAllAnnotations() {
guard let annotations else {
return
}
removeAnnotations(annotations)
}
}
private extension MapTilerStyle {
init(_ colorScheme: ColorScheme) {
switch colorScheme {

View File

@ -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>
}

View File

@ -27,14 +27,6 @@ class NetworkMonitor: NetworkMonitorProtocol {
reachabilitySubject.asCurrentValuePublisher()
}
var isCurrentConnectionExpensive: Bool {
pathMonitor.currentPath.isExpensive
}
var isCurrentConnectionConstrained: Bool {
pathMonitor.currentPath.isConstrained
}
init() {
queue = DispatchQueue(label: "io.element.elementx.networkmonitor", qos: .background)
pathMonitor = NWPathMonitor()

View File

@ -23,8 +23,6 @@ enum NetworkMonitorReachability {
protocol NetworkMonitorProtocol {
var reachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never> { get }
var isCurrentConnectionExpensive: Bool { get }
var isCurrentConnectionConstrained: Bool { get }
}
// sourcery: AutoMockable

View File

@ -80,10 +80,13 @@ final class PillAttachmentViewProvider: NSTextAttachmentViewProvider {
// Fixes crashes when inserting mention pills in the composer on Mac
// https://github.com/element-hq/element-x-ios/issues/2070
// periphery:ignore - read comment above
static var supportsSecureCoding = false
// periphery:ignore - read comment above
func encode(with coder: NSCoder) { }
// periphery:ignore - read comment above
init?(coder: NSCoder) {
fatalError("Not implemented")
}

View File

@ -77,8 +77,6 @@ struct LoadableImage<TransformerView: View, PlaceholderView: View>: View {
private struct LoadableImageContent<TransformerView: View, PlaceholderView: View>: View, ImageDataProvider {
private let mediaSource: MediaSourceProxy
private let blurhash: String?
private let size: CGSize?
private let imageProvider: ImageProviderProtocol?
private let transformer: (AnyView) -> TransformerView
private let placeholder: () -> PlaceholderView
@ -92,8 +90,6 @@ private struct LoadableImageContent<TransformerView: View, PlaceholderView: View
placeholder: @escaping () -> PlaceholderView) {
self.mediaSource = mediaSource
self.blurhash = blurhash
self.size = size
self.imageProvider = imageProvider
self.transformer = transformer
self.placeholder = placeholder
_contentLoader = StateObject(wrappedValue: ContentLoader(mediaSource: mediaSource, size: size, imageProvider: imageProvider))

View File

@ -18,8 +18,6 @@ import Compound
import SwiftUI
struct LocationMarkerView: View {
@Environment(\.dynamicTypeSize) private var dynamicTypeSize
var mode: Mode = .map
enum Mode { case map, button }

View File

@ -58,7 +58,7 @@ private struct PINTextFieldStyle: TextFieldStyle {
let pinCode: String
let isSecure: Bool
public func _body(configuration: TextField<_Label>) -> some View {
func _body(configuration: TextField<_Label>) -> some View {
HStack(spacing: 8) {
ForEach(0..<4) { index in
PINDigitField(digit: digit(index))

View File

@ -35,22 +35,4 @@ enum LoginMode: Equatable {
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
}
}
}

View File

@ -37,9 +37,7 @@ enum LoginScreenCoordinatorAction {
final class LoginScreenCoordinator: CoordinatorProtocol {
private let parameters: LoginScreenCoordinatorParameters
private var viewModel: LoginScreenViewModelProtocol
@CancellableTask private var currentTask: Task<Void, Error>?
private var authenticationService: AuthenticationServiceProxyProtocol { parameters.authenticationService }
private let actionsSubject: PassthroughSubject<LoginScreenCoordinatorAction, Never> = .init()

View File

@ -203,7 +203,6 @@ struct MessageComposer_Previews: PreviewProvider, TestablePreview {
]
static func messageComposer(_ content: String = "",
sendingDisabled: Bool = false,
mode: RoomScreenComposerMode = .default) -> MessageComposer {
let viewModel = WysiwygComposerViewModel(minHeight: 22,
maxExpandedHeight: 250)
@ -228,7 +227,7 @@ struct MessageComposer_Previews: PreviewProvider, TestablePreview {
static var previews: some View {
VStack(spacing: 8) {
messageComposer(sendingDisabled: true)
messageComposer()
messageComposer("Some message",
mode: .edit(originalItemId: .random))

View File

@ -28,7 +28,6 @@ enum PollFormScreenCoordinatorAction {
}
final class PollFormScreenCoordinator: CoordinatorProtocol {
private let parameters: PollFormScreenCoordinatorParameters
private var viewModel: PollFormScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<PollFormScreenCoordinatorAction, Never> = .init()
private var cancellables = Set<AnyCancellable>()
@ -38,8 +37,6 @@ final class PollFormScreenCoordinator: CoordinatorProtocol {
}
init(parameters: PollFormScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = PollFormScreenViewModel(mode: parameters.mode)
}

View File

@ -68,7 +68,6 @@ private struct MediaPreviewViewController: UIViewControllerRepresentable {
class PreviewHostingController: UIViewController, QLPreviewControllerDataSource, QLPreviewControllerDelegate {
let previewItem: MediaPreviewItem
let shouldHideControls: Bool
let dismissalPublisher: PassthroughSubject<Void, Never>
let onDismiss: () -> Void
private var dismissalObserver: AnyCancellable?
@ -81,7 +80,6 @@ private struct MediaPreviewViewController: UIViewControllerRepresentable {
onDismiss: @escaping () -> Void) {
self.previewItem = previewItem
self.shouldHideControls = shouldHideControls
self.dismissalPublisher = dismissalPublisher
self.onDismiss = onDismiss
super.init(nibName: nil, bundle: nil)

View File

@ -152,6 +152,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
}
}
// perphery: ignore - used in release mode
func presentCrashedLastRunAlert() {
state.bindings.alertInfo = AlertInfo(id: UUID(),
title: L10n.crashDetectionDialogContent(InfoPlistReader.main.bundleDisplayName),

View File

@ -22,5 +22,6 @@ protocol HomeScreenViewModelProtocol {
var context: HomeScreenViewModelType.Context { get }
// periphery: ignore - used in release mode
func presentCrashedLastRunAlert()
}

View File

@ -33,7 +33,6 @@ enum InviteUsersScreenCoordinatorAction {
}
final class InviteUsersScreenCoordinator: CoordinatorProtocol {
private let parameters: InviteUsersScreenCoordinatorParameters
private let viewModel: InviteUsersScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<InviteUsersScreenCoordinatorAction, Never> = .init()
private var cancellables = Set<AnyCancellable>()
@ -43,8 +42,6 @@ final class InviteUsersScreenCoordinator: CoordinatorProtocol {
}
init(parameters: InviteUsersScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = InviteUsersScreenViewModel(selectedUsers: parameters.selectedUsers,
roomType: parameters.roomType,
mediaProvider: parameters.mediaProvider,

View File

@ -17,6 +17,7 @@
import Foundation
import MatrixRustSDK
// periphery:ignore - for generic conformance
enum InviteUsersScreenErrorType: Error {
case unknown
}

View File

@ -22,7 +22,6 @@ typealias InviteUsersScreenViewModelType = StateStoreViewModel<InviteUsersScreen
class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScreenViewModelProtocol {
private let roomType: InviteUsersScreenRoomType
private let mediaProvider: MediaProviderProtocol
private let userDiscoveryService: UserDiscoveryServiceProtocol
private let appSettings: AppSettings
private let userIndicatorController: UserIndicatorControllerProtocol
@ -40,7 +39,6 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
appSettings: AppSettings,
userIndicatorController: UserIndicatorControllerProtocol) {
self.roomType = roomType
self.mediaProvider = mediaProvider
self.userDiscoveryService = userDiscoveryService
self.appSettings = appSettings
self.userIndicatorController = userIndicatorController
@ -89,6 +87,7 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
}
}
// periphery:ignore - automatically cancelled when set to nil
@CancellableTask
private var fetchUsersTask: Task<Void, Never>?

View File

@ -26,7 +26,6 @@ enum InvitesScreenCoordinatorAction {
}
final class InvitesScreenCoordinator: CoordinatorProtocol {
private let parameters: InvitesScreenCoordinatorParameters
private var viewModel: InvitesScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<InvitesScreenCoordinatorAction, Never> = .init()
private var cancellables = Set<AnyCancellable>()
@ -36,7 +35,6 @@ final class InvitesScreenCoordinator: CoordinatorProtocol {
}
init(parameters: InvitesScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = InvitesScreenViewModel(userSession: parameters.userSession,
appSettings: ServiceLocator.shared.settings,
analytics: ServiceLocator.shared.analytics,

View File

@ -155,6 +155,7 @@ class InvitesScreenViewModel: InvitesScreenViewModelType, InvitesScreenViewModel
}
private func displayError(_ error: RoomProxyError) {
MXLog.error("Failed to accept/decline invite: \(error)")
state.bindings.alertInfo = .init(id: true,
title: L10n.commonError,
message: L10n.errorUnknown)

View File

@ -29,7 +29,6 @@ enum MessageForwardingScreenCoordinatorAction {
}
final class MessageForwardingScreenCoordinator: CoordinatorProtocol {
private let parameters: MessageForwardingScreenCoordinatorParameters
private var viewModel: MessageForwardingScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<MessageForwardingScreenCoordinatorAction, Never> = .init()
private var cancellables = Set<AnyCancellable>()
@ -39,8 +38,6 @@ final class MessageForwardingScreenCoordinator: CoordinatorProtocol {
}
init(parameters: MessageForwardingScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = MessageForwardingScreenViewModel(roomSummaryProvider: parameters.roomSummaryProvider,
mediaProvider: parameters.mediaProvider,
sourceRoomID: parameters.sourceRoomID)

View File

@ -19,7 +19,6 @@ import SwiftUI
final class MigrationScreenCoordinator: CoordinatorProtocol {
private var viewModel: MigrationScreenViewModelProtocol
private var cancellables = Set<AnyCancellable>()
init() {
viewModel = MigrationScreenViewModel()

View File

@ -16,8 +16,6 @@
import Foundation
enum MigrationScreenViewModelAction { }
struct MigrationScreenViewState: BindableState { }
enum MigrationScreenViewAction { }

View File

@ -20,12 +20,6 @@ import SwiftUI
typealias MigrationScreenViewModelType = StateStoreViewModel<MigrationScreenViewState, MigrationScreenViewAction>
class MigrationScreenViewModel: MigrationScreenViewModelType, MigrationScreenViewModelProtocol {
private var actionsSubject: PassthroughSubject<MigrationScreenViewModelAction, Never> = .init()
var actions: AnyPublisher<MigrationScreenViewModelAction, Never> {
actionsSubject.eraseToAnyPublisher()
}
init() {
super.init(initialViewState: MigrationScreenViewState())
}

View File

@ -18,6 +18,5 @@ import Combine
@MainActor
protocol MigrationScreenViewModelProtocol {
var actions: AnyPublisher<MigrationScreenViewModelAction, Never> { get }
var context: MigrationScreenViewModelType.Context { get }
}

View File

@ -22,13 +22,6 @@ enum OnboardingScreenCoordinatorAction {
case login
}
/// The content displayed in a single screen page.
struct OnboardingScreenPageContent {
let title: AttributedString
let message: String
let image: ImageAsset
}
enum OnboardingScreenViewModelAction {
case login
}

View File

@ -18,13 +18,7 @@ import Compound
import SwiftUI
struct ReportContentScreen: View {
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
@ObservedObject var context: ReportContentScreenViewModel.Context
private var horizontalPadding: CGFloat {
horizontalSizeClass == .regular ? 50 : 16
}
var body: some View {
Form {

View File

@ -35,7 +35,6 @@ enum RoomDetailsScreenCoordinatorAction {
}
final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
private let parameters: RoomDetailsScreenCoordinatorParameters
private var viewModel: RoomDetailsScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<RoomDetailsScreenCoordinatorAction, Never> = .init()
@ -46,8 +45,6 @@ final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
}
init(parameters: RoomDetailsScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = RoomDetailsScreenViewModel(accountUserID: parameters.accountUserID,
roomProxy: parameters.roomProxy,
mediaProvider: parameters.mediaProvider,

View File

@ -219,12 +219,6 @@ extension RoomDetailsNotificationSettingsState {
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.
var isCustom: Bool {
guard case let .loaded(settings) = self else { return false }

View File

@ -29,7 +29,6 @@ enum RoomMemberDetailsScreenCoordinatorAction {
}
final class RoomMemberDetailsScreenCoordinator: CoordinatorProtocol {
private let parameters: RoomMemberDetailsScreenCoordinatorParameters
private var viewModel: RoomMemberDetailsScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<RoomMemberDetailsScreenCoordinatorAction, Never> = .init()
@ -40,8 +39,6 @@ final class RoomMemberDetailsScreenCoordinator: CoordinatorProtocol {
}
init(parameters: RoomMemberDetailsScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = RoomMemberDetailsScreenViewModel(roomProxy: parameters.roomProxy,
roomMemberProxy: parameters.roomMemberProxy,
mediaProvider: parameters.mediaProvider,

View File

@ -83,6 +83,5 @@ enum RoomMemberDetailsScreenViewAction {
}
enum RoomMemberDetailsScreenError: Hashable {
case alert(String)
case unknown
}

View File

@ -28,7 +28,6 @@ enum RoomMembersListScreenCoordinatorAction {
}
final class RoomMembersListScreenCoordinator: CoordinatorProtocol {
private let parameters: RoomMembersListScreenCoordinatorParameters
private var viewModel: RoomMembersListScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<RoomMembersListScreenCoordinatorAction, Never> = .init()
@ -39,8 +38,6 @@ final class RoomMembersListScreenCoordinator: CoordinatorProtocol {
}
init(parameters: RoomMembersListScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = RoomMembersListScreenViewModel(roomProxy: parameters.roomProxy,
mediaProvider: parameters.mediaProvider,
userIndicatorController: ServiceLocator.shared.userIndicatorController)

View File

@ -18,8 +18,6 @@ import Compound
import SwiftUI
struct RoomMembersListScreen: View {
@Environment(\.colorScheme) private var colorScheme
@ObservedObject var context: RoomMembersListScreenViewModel.Context
var body: some View {

View File

@ -38,10 +38,6 @@ final class RoomNotificationSettingsScreenCoordinator: CoordinatorProtocol {
var actions: AnyPublisher<RoomNotificationSettingsScreenCoordinatorAction, Never> {
actionsSubject.eraseToAnyPublisher()
}
private var navigationStackCoordinator: NavigationStackCoordinator? {
parameters.navigationStackCoordinator
}
init(parameters: RoomNotificationSettingsScreenCoordinatorParameters) {
self.parameters = parameters

View File

@ -81,7 +81,6 @@ struct RoomNotificationSettingsScreenViewState: BindableState {
struct RoomNotificationSettingsScreenViewStateBindings {
var allowCustomSetting = false
var customMode: RoomNotificationModeProxy = .allMessages
/// Information describing the currently displayed alert.
var alertInfo: AlertInfo<RoomNotificationSettingsScreenErrorType>?
}

View File

@ -24,6 +24,7 @@ class RoomNotificationSettingsScreenViewModel: RoomNotificationSettingsScreenVie
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
private let roomProxy: RoomProxyProtocol
// periphery:ignore - cancellable tasks cancel when reassigned
@CancellableTask private var fetchNotificationSettingsTask: Task<Void, Error>?
var actions: AnyPublisher<RoomNotificationSettingsScreenViewModelAction, Never> {
@ -94,9 +95,6 @@ class RoomNotificationSettingsScreenViewModel: RoomNotificationSettingsScreenVie
if !state.isRestoringDefaultSetting {
state.bindings.allowCustomSetting = !settings.isDefault
}
if state.pendingCustomMode == nil {
state.bindings.customMode = settings.mode
}
} catch {
state.notificationSettingsState = .error
displayError(.loadingSettingsFailed)

View File

@ -45,7 +45,6 @@ enum RoomScreenCoordinatorAction {
}
final class RoomScreenCoordinator: CoordinatorProtocol {
private var parameters: RoomScreenCoordinatorParameters
private var viewModel: RoomScreenViewModelProtocol
private var composerViewModel: ComposerToolbarViewModel
private var wysiwygViewModel: WysiwygComposerViewModel
@ -58,8 +57,6 @@ final class RoomScreenCoordinator: CoordinatorProtocol {
}
init(parameters: RoomScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = RoomScreenViewModel(roomProxy: parameters.roomProxy,
timelineController: parameters.timelineController,
mediaProvider: parameters.mediaProvider,

View File

@ -23,10 +23,6 @@ struct ReactionsSummaryView: View {
@State var selectedReactionKey: String
var selectedReactionIndex: Int {
reactions.firstIndex(where: { $0.key == selectedReactionKey }) ?? 0
}
var body: some View {
VStack(alignment: .leading, spacing: 0) {
reactionButtons

View File

@ -18,7 +18,6 @@ import SwiftUI
struct PollRoomTimelineView: View {
let timelineItem: PollRoomTimelineItem
@Environment(\.timelineStyle) var timelineStyle
@EnvironmentObject private var context: RoomScreenViewModel.Context
private let feedbackGenerator = UIImpactFeedbackGenerator(style: .heavy)

View File

@ -14,13 +14,13 @@
// limitations under the License.
//
// periphery:ignore:all - subscripts lead to false positives
import Foundation
struct AdvancedSettingsScreenViewState: BindableState {
var bindings: AdvancedSettingsScreenViewStateBindings
}
// periphery:ignore - subscript are seen as false positives
@dynamicMemberLookup
struct AdvancedSettingsScreenViewStateBindings {
private let advancedSettings: AdvancedSettingsProtocol

View File

@ -16,6 +16,7 @@
import Foundation
// periphery:ignore - required for the architecture
enum LegalInformationScreenViewModelAction { }
struct LegalInformationScreenViewState: BindableState {

View File

@ -16,6 +16,7 @@
import Combine
// periphery:ignore - markdown protocol
@MainActor
protocol LegalInformationScreenViewModelProtocol {
var context: LegalInformationScreenViewModelType.Context { get }

View File

@ -24,18 +24,11 @@ struct NotificationSettingsEditScreenCoordinatorParameters {
let notificationSettings: NotificationSettingsProxyProtocol
}
enum NotificationSettingsEditScreenCoordinatorAction { }
final class NotificationSettingsEditScreenCoordinator: CoordinatorProtocol {
private let parameters: NotificationSettingsEditScreenCoordinatorParameters
private var viewModel: NotificationSettingsEditScreenViewModelProtocol
private let actionsSubject: PassthroughSubject<NotificationSettingsEditScreenCoordinatorAction, Never> = .init()
private var cancellables = Set<AnyCancellable>()
var actions: AnyPublisher<NotificationSettingsEditScreenCoordinatorAction, Never> {
actionsSubject.eraseToAnyPublisher()
}
init(parameters: NotificationSettingsEditScreenCoordinatorParameters) {
self.parameters = parameters

View File

@ -53,7 +53,6 @@ struct NotificationSettingsEditScreenViewState: BindableState {
}
struct NotificationSettingsEditScreenViewStateBindings {
var searchQuery = ""
var alertInfo: AlertInfo<NotificationSettingsEditScreenErrorType>?
}
@ -103,8 +102,6 @@ struct NotificationSettingsEditScreenStrings {
}
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
/// or a completely unique one for empty items and skeletons
let id: String
@ -117,13 +114,4 @@ struct NotificationSettingsEditScreenRoom: Identifiable, Equatable {
var avatarURL: URL?
var notificationMode: RoomNotificationModeProxy?
var isPlaceholder = false
static func placeholder() -> NotificationSettingsEditScreenRoom {
NotificationSettingsEditScreenRoom(id: UUID().uuidString,
roomId: nil,
name: "Placeholder room name",
isPlaceholder: true)
}
}

View File

@ -26,7 +26,9 @@ class NotificationSettingsEditScreenViewModel: NotificationSettingsEditScreenVie
private let userSession: UserSessionProtocol
private let roomSummaryProvider: RoomSummaryProviderProtocol?
// periphery:ignore - cancellable tasks get cancelled when reassigned
@CancellableTask private var fetchDefaultRoomNotificationModesTask: Task<Void, Error>?
// periphery:ignore - cancellable tasks get cancelled when reassigned
@CancellableTask private var updateRoomsWithUserDefinedModeTask: Task<Void, Error>?
var actions: AnyPublisher<NotificationSettingsEditScreenViewModelAction, Never> {

View File

@ -19,7 +19,6 @@ import SwiftUI
struct NotificationSettingsEditScreen: View {
@ObservedObject var context: NotificationSettingsEditScreenViewModel.Context
@State var isSearching = false
var body: some View {
Form {

View File

@ -46,8 +46,7 @@ final class NotificationSettingsScreenCoordinator: CoordinatorProtocol {
init(parameters: NotificationSettingsScreenCoordinatorParameters) {
self.parameters = parameters
viewModel = NotificationSettingsScreenViewModel(userSession: parameters.userSession,
appSettings: ServiceLocator.shared.settings,
viewModel = NotificationSettingsScreenViewModel(appSettings: ServiceLocator.shared.settings,
userNotificationCenter: parameters.userNotificationCenter,
notificationSettingsProxy: parameters.notificationSettings,
isModallyPresented: parameters.isModallyPresented)

View File

@ -27,7 +27,6 @@ struct NotificationSettingsScreenViewState: BindableState {
var strings = NotificationSettingsScreenStrings()
let isModallyPresented: Bool
var isUserPermissionGranted: Bool?
var allowedNotificationModes: [RoomNotificationModeProxy] = [.allMessages, .mentionsAndKeywordsOnly]
var fixingConfigurationMismatch = false
// Hide calls settings until calls are available in El-X
let showCallsSettings = false

View File

@ -24,15 +24,14 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy
private let appSettings: AppSettings
private let userNotificationCenter: UserNotificationCenterProtocol
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
private let userSession: UserSessionProtocol
// periphery:ignore - cancellable tasks get cancelled when reassigned
@CancellableTask private var fetchSettingsTask: Task<Void, Error>?
var actions: AnyPublisher<NotificationSettingsScreenViewModelAction, Never> {
actionsSubject.eraseToAnyPublisher()
}
init(userSession: UserSessionProtocol, appSettings: AppSettings, userNotificationCenter: UserNotificationCenterProtocol, notificationSettingsProxy: NotificationSettingsProxyProtocol, isModallyPresented: Bool) {
self.userSession = userSession
init(appSettings: AppSettings, userNotificationCenter: UserNotificationCenterProtocol, notificationSettingsProxy: NotificationSettingsProxyProtocol, isModallyPresented: Bool) {
self.appSettings = appSettings
self.userNotificationCenter = userNotificationCenter
self.notificationSettingsProxy = notificationSettingsProxy

View File

@ -220,8 +220,7 @@ struct NotificationSettingsScreen_Previews: PreviewProvider, TestablePreview {
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "John Doe"), mediaProvider: MockMediaProvider(),
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
var viewModel = NotificationSettingsScreenViewModel(userSession: userSession,
appSettings: appSettings,
var viewModel = NotificationSettingsScreenViewModel(appSettings: appSettings,
userNotificationCenter: notificationCenter,
notificationSettingsProxy: notificationSettingsProxy,
isModallyPresented: true)
@ -249,8 +248,7 @@ struct NotificationSettingsScreen_Previews: PreviewProvider, TestablePreview {
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "John Doe"), mediaProvider: MockMediaProvider(), voiceMessageMediaManager: VoiceMessageMediaManagerMock())
var viewModel = NotificationSettingsScreenViewModel(userSession: userSession,
appSettings: appSettings,
var viewModel = NotificationSettingsScreenViewModel(appSettings: appSettings,
userNotificationCenter: notificationCenter,
notificationSettingsProxy: notificationSettingsProxy,
isModallyPresented: true)

View File

@ -50,10 +50,6 @@ class PostHogAnalyticsClient: AnalyticsClientProtocol {
// it. Keep it around to avoid having multiple instances if the user re-enables
}
func flush() {
postHog?.flush()
}
func capture(_ event: AnalyticsEventProtocol) {
guard isRunning else { return }
postHog?.capture(event.eventName, properties: attachUserProperties(to: event.properties))

View File

@ -27,15 +27,12 @@ protocol KeychainControllerProtocol: ClientSessionDelegate {
// MARK: Restoration Tokens
func setRestorationToken(_ restorationToken: RestorationToken, forUsername: String)
func restorationTokenForUsername(_ username: String) -> RestorationToken?
func restorationTokens() -> [KeychainCredentials]
func removeRestorationTokenForUsername(_ username: String)
func removeAllRestorationTokens()
// 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.
func containsPINCode() throws -> Bool
/// Sets a new PIN code for App Lock.

View File

@ -25,7 +25,6 @@ indirect enum MediaUploadingPreprocessorError: Error {
case failedProcessingImage(MediaUploadingPreprocessorError)
case failedProcessingVideo(MediaUploadingPreprocessorError)
case failedProcessingAudio
case failedProcessingFile
case failedGeneratingVideoThumbnail(Error?)
case failedGeneratingImageThumbnail(Error?)

View File

@ -28,8 +28,4 @@ extension ImageProviderProtocol {
func imageFromSource(_ source: MediaSourceProxy?) -> UIImage? {
imageFromSource(source, size: nil)
}
func loadImageFromSource(_ source: MediaSourceProxy) async -> Result<UIImage, MediaProviderError> {
await loadImageFromSource(source, size: nil)
}
}

View File

@ -23,9 +23,3 @@ protocol MediaLoaderProtocol {
func loadMediaFileForSource(_ source: MediaSourceProxy, body: String?) async throws -> MediaFileHandleProxy
}
extension MediaLoaderProtocol {
func loadMediaFileForSource(_ source: MediaSourceProxy) async throws -> MediaFileHandleProxy {
try await loadMediaFileForSource(source, body: nil)
}
}

View File

@ -40,11 +40,11 @@ struct MediaSourceProxy: Hashable {
// MARK: - Hashable
public static func == (lhs: MediaSourceProxy, rhs: MediaSourceProxy) -> Bool {
static func == (lhs: MediaSourceProxy, rhs: MediaSourceProxy) -> Bool {
lhs.url == rhs.url
}
public func hash(into hasher: inout Hasher) {
func hash(into hasher: inout Hasher) {
hasher.combine(url)
}
}

View File

@ -23,7 +23,6 @@ enum NotificationConstants {
static let unreadCount = "unread_count"
static let pusherNotificationClientIdentifier = "pusher_notification_client_identifier"
static let receiverIdentifier = "receiver_id"
static let notificationIdentifier = "notification_identifier"
}
enum Category {

View File

@ -45,10 +45,6 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
notificationItem.roomInfo.displayName
}
var roomCanonicalAlias: String? {
notificationItem.roomInfo.canonicalAlias
}
var isRoomDirect: Bool {
notificationItem.roomInfo.isDirect
}
@ -96,27 +92,17 @@ struct EmptyNotificationItemProxy: NotificationItemProxyProtocol {
var senderID: String { "" }
var senderDisplayName: String? { nil }
var senderAvatarURL: String? { nil }
var roomDisplayName: String { "" }
var roomCanonicalAlias: String? { nil }
var roomAvatarURL: String? { nil }
var isNoisy: Bool { false }
var isRoomDirect: Bool { false }
var isRoomEncrypted: Bool? { nil }
var senderAvatarMediaSource: MediaSourceProxy? { nil }
var roomAvatarMediaSource: MediaSourceProxy? { nil }
var notificationIdentifier: String { "" }
var roomJoinedMembers: Int { 0 }
var hasMention: Bool { false }

View File

@ -35,8 +35,6 @@ protocol NotificationItemProxyProtocol {
var roomDisplayName: String { get }
var roomCanonicalAlias: String? { get }
var roomAvatarMediaSource: MediaSourceProxy? { get }
var roomJoinedMembers: Int { get }

View File

@ -92,10 +92,6 @@ final class NotificationSettingsProxy: NotificationSettingsProxyProtocol {
try await notificationSettings.restoreDefaultRoomNotificationMode(roomId: roomId)
await updatedSettings()
}
func containsKeywordsRules() async -> Bool {
await notificationSettings.containsKeywordsRules()
}
func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool) async throws {
let backgroundTask = await backgroundTaskService?.startBackgroundTask(withName: "unmuteRoom")
@ -117,18 +113,6 @@ final class NotificationSettingsProxy: NotificationSettingsProxyProtocol {
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 {
try await notificationSettings.isCallEnabled()
}

View File

@ -32,12 +32,9 @@ protocol NotificationSettingsProxyProtocol {
func getDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool) async -> RoomNotificationModeProxy
func setDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool, mode: RoomNotificationModeProxy) async throws
func restoreDefaultNotificationMode(roomId: String) async throws
func containsKeywordsRules() async -> Bool
func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool) async throws
func isRoomMentionEnabled() async throws -> Bool
func setRoomMentionEnabled(enabled: Bool) async throws
func isUserMentionEnabled() async throws -> Bool
func setUserMentionEnabled(enabled: Bool) async throws
func isCallEnabled() async throws -> Bool
func setCallEnabled(enabled: Bool) async throws
func isInviteForMeEnabled() async throws -> Bool

View File

@ -39,12 +39,6 @@ final class RoomMemberProxy: RoomMemberProxyProtocol {
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 isIgnored = member.isIgnored()

View File

@ -28,9 +28,6 @@ protocol RoomMemberProxyProtocol: AnyObject {
var displayName: String? { get }
var avatarURL: URL? { get }
var membership: MembershipState { get }
var isNameAmbiguous: Bool { get }
var powerLevel: Int { get }
var normalizedPowerLevel: Int { get }
var isAccountOwner: Bool { get }
var isIgnored: Bool { get }
var canInviteUsers: Bool { get }

View File

@ -34,6 +34,7 @@ class RoomProxy: RoomProxyProtocol {
private var sendMessageBackgroundTask: BackgroundTaskProtocol?
private(set) var displayName: String?
// periphery:ignore - required for instance retention in the rust codebase
private var roomInfoObservationToken: TaskHandle?
private var subscribedForUpdates = false
@ -104,10 +105,6 @@ class RoomProxy: RoomProxyProtocol {
room.topic()
}
var isJoined: Bool {
room.membership() == .joined
}
var membership: Membership {
room.membership()
}
@ -128,10 +125,6 @@ class RoomProxy: RoomProxyProtocol {
(try? room.isEncrypted()) ?? false
}
var isTombstoned: Bool {
room.isTombstoned()
}
var hasOngoingCall: Bool {
room.hasActiveRoomCall()
}
@ -140,10 +133,6 @@ class RoomProxy: RoomProxyProtocol {
room.canonicalAlias()
}
var alternativeAliases: [String] {
room.alternativeAliases()
}
var hasUnreadNotifications: Bool {
roomListItem.hasUnreadNotifications()
}
@ -163,36 +152,6 @@ class RoomProxy: RoomProxyProtocol {
var activeMembersCount: Int {
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> {
sendMessageBackgroundTask = await backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
@ -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> {
await Task.dispatch(on: .global()) {
do {

View File

@ -19,8 +19,6 @@ import Foundation
import MatrixRustSDK
enum RoomProxyError: Error, Equatable {
case failedRetrievingMemberAvatarURL
case failedRetrievingMemberDisplayName
case failedRedactingEvent
case failedReportingContent
case failedRetrievingMember
@ -46,11 +44,9 @@ protocol RoomProxyProtocol {
var isPublic: Bool { get }
var isSpace: Bool { get }
var isEncrypted: Bool { get }
var isTombstoned: Bool { get }
var membership: Membership { get }
var hasOngoingCall: Bool { get }
var canonicalAlias: String? { get }
var alternativeAliases: [String] { get }
var hasUnreadNotifications: Bool { get }
var ownUserID: String { get }
@ -62,9 +58,7 @@ protocol RoomProxyProtocol {
var avatarURL: URL? { get }
var members: CurrentValuePublisher<[RoomMemberProxyProtocol], Never> { get }
var invitedMembersCount: Int { get }
var joinedMembersCount: Int { get }
var activeMembersCount: Int { get }
@ -73,14 +67,7 @@ protocol RoomProxyProtocol {
var timeline: TimelineProxyProtocol { get }
/// A timeline providing just polls related events
var pollHistoryTimeline: TimelineProxyProtocol { get }
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>
@ -93,8 +80,6 @@ protocol RoomProxyProtocol {
func updateMembers() async
func getMember(userID: String) async -> Result<RoomMemberProxyProtocol, RoomProxyError>
func inviter() async -> RoomMemberProxyProtocol?
func rejectInvitation() async -> Result<Void, RoomProxyError>

View File

@ -48,9 +48,9 @@ struct RoomEventStringBuilder {
let messageType = messageContent.msgtype()
return messageEventStringBuilder.buildAttributedString(for: messageType, senderDisplayName: senderDisplayName, prefixWithSenderName: true)
case .state(let stateKey, let state):
case .state(_, let state):
return stateEventStringBuilder
.buildString(for: state, stateKey: stateKey, sender: sender, isOutgoing: isOutgoing)
.buildString(for: state, sender: sender, isOutgoing: isOutgoing)
.map(AttributedString.init)
case .roomMembership(let userID, let change):
return stateEventStringBuilder

View File

@ -22,10 +22,6 @@ import WysiwygComposer
struct IntentionalMentions: Equatable {
let userIDs: Set<String>
let atRoom: Bool
static var empty: Self {
IntentionalMentions(userIDs: [], atRoom: false)
}
}
extension IntentionalMentions {

View File

@ -14,15 +14,14 @@
// limitations under the License.
//
// periphery:ignore:all
import Combine
import Foundation
class MockRoomTimelineController: RoomTimelineControllerProtocol {
/// An array of timeline item arrays that will be inserted in order for each back pagination request.
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.
var incomingItems: [RoomTimelineItemProtocol] = []

View File

@ -18,23 +18,12 @@ struct LocationRoomTimelineItemContent: Hashable {
let body: String
let geoURI: GeoURI?
let description: String?
let zoomLevel: UInt8?
let asset: AssetType?
enum AssetType {
case sender
case pin
}
init(body: String,
geoURI: GeoURI? = nil,
description: String? = nil,
zoomLevel: UInt8? = nil,
asset: AssetType? = nil) {
description: String? = nil) {
self.body = body
self.geoURI = geoURI
self.description = description
self.zoomLevel = zoomLevel
self.asset = asset
}
}

View File

@ -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
switch state {

View File

@ -526,9 +526,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
private func buildLocationTimelineItemContent(_ locationContent: LocationContent) -> LocationRoomTimelineItemContent {
LocationRoomTimelineItemContent(body: locationContent.body,
geoURI: .init(string: locationContent.geoUri),
description: locationContent.description,
zoomLevel: locationContent.zoomLevel,
asset: locationContent.asset.map { .init(assetType: $0) })
description: locationContent.description)
}
private func buildFileTimelineItemContent(_ messageContent: FileMessageContent) -> FileRoomTimelineItemContent {
@ -568,7 +566,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
state: OtherState,
stateKey: String,
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)
}
@ -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 {
init(pollKind: MatrixRustSDK.PollKind) {
switch pollKind {

View File

@ -786,8 +786,8 @@ class MockScreen: Identifiable {
ServiceLocator.shared.settings.seenInvites = Set([RoomSummary].mockInvites.dropFirst(1).compactMap(\.id))
let navigationStackCoordinator = NavigationStackCoordinator()
let clientProxy = MockClientProxy(userID: "@mock:client.com")
clientProxy.roomForIdentifierMocks["someAwesomeRoomId1"] = .init(with: .init(displayName: "First room", inviter: .mockCharlie))
clientProxy.roomForIdentifierMocks["someAwesomeRoomId2"] = .init(with: .init(displayName: "Second room", inviter: .mockCharlie))
clientProxy.roomForIdentifierMocks["someAwesomeRoomId1"] = .init(with: .init(displayName: "First room"))
clientProxy.roomForIdentifierMocks["someAwesomeRoomId2"] = .init(with: .init(displayName: "Second room"))
let summaryProvider = MockRoomSummaryProvider(state: .loaded(.mockInvites))
clientProxy.inviteSummaryProvider = summaryProvider
@ -798,8 +798,8 @@ class MockScreen: Identifiable {
ServiceLocator.shared.settings.seenInvites = Set([RoomSummary].mockInvites.compactMap(\.id))
let navigationStackCoordinator = NavigationStackCoordinator()
let clientProxy = MockClientProxy(userID: "@mock:client.com")
clientProxy.roomForIdentifierMocks["someAwesomeRoomId1"] = .init(with: .init(displayName: "First room", inviter: .mockCharlie))
clientProxy.roomForIdentifierMocks["someAwesomeRoomId2"] = .init(with: .init(displayName: "Second room", inviter: .mockCharlie))
clientProxy.roomForIdentifierMocks["someAwesomeRoomId1"] = .init(with: .init(displayName: "First room"))
clientProxy.roomForIdentifierMocks["someAwesomeRoomId2"] = .init(with: .init(displayName: "Second room"))
let summaryProvider = MockRoomSummaryProvider(state: .loaded(.mockInvites))
clientProxy.inviteSummaryProvider = summaryProvider

View File

@ -66,7 +66,7 @@ enum NSELogger {
/// Formatted memory footprint for debugging purposes
/// - Returns: Memory footprint in MBs as a readable string
public static var formattedMemoryFootprint: String {
static var formattedMemoryFootprint: String {
let usedBytes = UInt64(memoryFootprint ?? 0)
let usedMB = Double(usedBytes) / 1024 / 1024
guard let formattedStr = numberFormatter.string(from: NSNumber(value: usedMB)) else {

View File

@ -73,40 +73,6 @@ class RoomScreenUITests: XCTestCase {
// The bottom of the timeline should remain visible with more items added above.
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 {
let client = try UITestsSignalling.Client(mode: .tests)

View File

@ -22,7 +22,6 @@ import XCTest
@MainActor
class InviteUsersScreenViewModelTests: XCTestCase {
var viewModel: InviteUsersScreenViewModelProtocol!
var clientProxy: MockClientProxy!
var userDiscoveryService: UserDiscoveryServiceMock!
private var cancellables = Set<AnyCancellable>()
@ -96,7 +95,6 @@ class InviteUsersScreenViewModelTests: XCTestCase {
private func setupWithRoomType(roomType: InviteUsersScreenRoomType) {
let usersSubject = CurrentValueSubject<[UserProfileProxy], Never>([])
clientProxy = .init(userID: "")
userDiscoveryService = UserDiscoveryServiceMock()
userDiscoveryService.fetchSuggestionsReturnValue = .success([])
userDiscoveryService.searchProfilesWithReturnValue = .success([])

View File

@ -50,11 +50,6 @@ struct LayoutSubviewsMock: Equatable, RandomAccessCollection {
subscript(bounds: Range<Int>) -> LayoutSubviewsMock {
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

View File

@ -24,7 +24,6 @@ class NotificationSettingsScreenViewModelTests: XCTestCase {
private var viewModel: NotificationSettingsScreenViewModelProtocol!
private var context: NotificationSettingsScreenViewModelType.Context!
private var appSettings: AppSettings!
private var userSession: UserSessionProtocol!
private var userNotificationCenter: UserNotificationCenterMock!
private var notificationSettingsProxy: NotificationSettingsProxyMock!
@ -38,14 +37,8 @@ class NotificationSettingsScreenViewModelTests: XCTestCase {
notificationSettingsProxy.getDefaultRoomNotificationModeIsEncryptedIsOneToOneReturnValue = .allMessages
notificationSettingsProxy.isRoomMentionEnabledReturnValue = true
notificationSettingsProxy.isCallEnabledReturnValue = true
let clientProxy = MockClientProxy(userID: "@a:b.com")
userSession = MockUserSession(clientProxy: clientProxy,
mediaProvider: MockMediaProvider(),
voiceMessageMediaManager: VoiceMessageMediaManagerMock())
viewModel = NotificationSettingsScreenViewModel(userSession: userSession,
appSettings: appSettings,
viewModel = NotificationSettingsScreenViewModel(appSettings: appSettings,
userNotificationCenter: userNotificationCenter,
notificationSettingsProxy: notificationSettingsProxy,
isModallyPresented: false)

View File

@ -132,13 +132,3 @@ class RoomDetailsEditScreenViewModelTests: XCTestCase {
userIndicatorController: userIndicatorController)
}
}
private extension ImageInfo {
static let mock: ImageInfo = .init(height: nil,
width: nil,
mimetype: nil,
size: nil,
thumbnailInfo: nil,
thumbnailSource: nil,
blurhash: nil)
}