mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
222f3292a2
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/ci-tests.yml # .github/workflows/release-alpha.yml # .github/workflows/triage-move-labelled.yml # .github/workflows/triage-priority-bugs.yml # .gitignore # CHANGES.md # Config/AppConfiguration.swift # Config/AppIdentifiers.xcconfig # Config/AppVersion.xcconfig # Config/BuildSettings.swift # Config/CommonConfiguration.swift # Gemfile # Gemfile.lock # IDETemplateMacros.plist # Podfile # Podfile.lock # README.md # Riot.xcodeproj/xcshareddata/xcschemes/Riot.xcscheme # Riot/Assets/Images.xcassets/Common/reveal_password_button.imageset/reveal_password_button.png # Riot/Assets/Images.xcassets/Common/reveal_password_button.imageset/reveal_password_button@2x.png # Riot/Assets/Images.xcassets/Common/reveal_password_button.imageset/reveal_password_button@3x.png # Riot/Assets/Images.xcassets/People/people_floating_action.imageset/Contents.json # Riot/Assets/Images.xcassets/Rooms/rooms_floating_action.imageset/Contents.json # Riot/Assets/Images.xcassets/Secrets/Recovery/secrets_recovery_key.imageset/Contents.json # Riot/Assets/Images.xcassets/Secrets/Recovery/secrets_recovery_passphrase.imageset/Contents.json # Riot/Assets/Images.xcassets/Secrets/Setup/secrets_setup_key.imageset/Contents.json # Riot/Assets/Images.xcassets/Secrets/Setup/secrets_setup_passphrase.imageset/Contents.json # Riot/Assets/Images.xcassets/TabBar/tab_people.imageset/Contents.json # Riot/Assets/Images.xcassets/TabBar/tab_rooms.imageset/Contents.json # Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Contents.json # Riot/Assets/SharedImages.xcassets/horizontal_logo.imageset/Contents.json # Riot/Assets/ar.lproj/InfoPlist.strings # Riot/Assets/cs.lproj/Vector.strings # Riot/Assets/de.lproj/InfoPlist.strings # Riot/Assets/de.lproj/Localizable.strings # Riot/Assets/de.lproj/Vector.strings # Riot/Assets/en.lproj/Localizable.strings # Riot/Assets/en.lproj/Untranslated.strings # Riot/Assets/en.lproj/Vector.strings # Riot/Assets/es.lproj/InfoPlist.strings # Riot/Assets/es.lproj/Vector.strings # Riot/Assets/et.lproj/InfoPlist.strings # Riot/Assets/et.lproj/Vector.strings # Riot/Assets/fr.lproj/InfoPlist.strings # Riot/Assets/fr.lproj/Vector.strings # Riot/Assets/hu.lproj/InfoPlist.strings # Riot/Assets/hu.lproj/Vector.strings # Riot/Assets/id.lproj/InfoPlist.strings # Riot/Assets/id.lproj/Vector.strings # Riot/Assets/is.lproj/InfoPlist.strings # Riot/Assets/is.lproj/Vector.strings # Riot/Assets/it.lproj/InfoPlist.strings # Riot/Assets/it.lproj/Vector.strings # Riot/Assets/ja.lproj/InfoPlist.strings # Riot/Assets/ja.lproj/Localizable.strings # Riot/Assets/ja.lproj/Vector.strings # Riot/Assets/nl.lproj/InfoPlist.strings # Riot/Assets/nl.lproj/Vector.strings # Riot/Assets/pl.lproj/InfoPlist.strings # Riot/Assets/pl.lproj/Vector.strings # Riot/Assets/pt_BR.lproj/InfoPlist.strings # Riot/Assets/pt_BR.lproj/Vector.strings # Riot/Assets/ru.lproj/InfoPlist.strings # Riot/Assets/ru.lproj/Vector.strings # Riot/Assets/sk.lproj/InfoPlist.strings # Riot/Assets/sk.lproj/Vector.strings # Riot/Assets/sq.lproj/InfoPlist.strings # Riot/Assets/sq.lproj/Vector.strings # Riot/Assets/sv.lproj/InfoPlist.strings # Riot/Assets/sv.lproj/Vector.strings # Riot/Assets/third_party_licenses.html # Riot/Assets/uk.lproj/InfoPlist.strings # Riot/Assets/uk.lproj/Vector.strings # Riot/Assets/zh_Hans.lproj/InfoPlist.strings # Riot/Assets/zh_Hans.lproj/Localizable.strings # Riot/Assets/zh_Hans.lproj/Vector.strings # Riot/Assets/zh_Hant.lproj/Vector.strings # Riot/Categories/MXKRoomBubbleTableViewCell+Riot.h # Riot/Categories/MXKRoomBubbleTableViewCell+Riot.m # Riot/Categories/MXRestClient+Async.swift # Riot/Categories/MXSession+Riot.m # Riot/Categories/NSAttributedString.swift # Riot/Categories/Publisher+Riot.swift # Riot/Categories/RoomBubbleCellData.swift # Riot/Categories/UILabel.swift # Riot/Categories/UIScrollView.swift # Riot/Categories/UIView.swift # Riot/Categories/UIViewController.swift # Riot/Generated/Images.swift # Riot/Generated/Strings.swift # Riot/Generated/UntranslatedStrings.swift # Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift # Riot/Managers/LocalAuthentication/LocalAuthenticationService.swift # Riot/Managers/PushNotification/PushNotificationService.m # Riot/Managers/PushNotification/PushNotificationStore.swift # Riot/Managers/Settings/RiotSettings.swift # Riot/Managers/Settings/Shared/RiotSharedSettings.swift # Riot/Managers/Theme/Themes/DarkTheme.swift # Riot/Managers/Theme/Themes/DefaultTheme.swift # Riot/Managers/UISIAutoReporter/UISIAutoReporter.swift # Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift # Riot/Modules/Analytics/Analytics.swift # Riot/Modules/Analytics/AnalyticsUIElement.swift # Riot/Modules/Analytics/DecryptionFailureTracker.m # Riot/Modules/Application/AppCoordinator.swift # Riot/Modules/Application/LegacyAppDelegate.h # Riot/Modules/Application/LegacyAppDelegate.m # Riot/Modules/Authentication/AuthenticationCoordinatorProtocol.swift # Riot/Modules/Common/Avatar/AvatarView.swift # Riot/Modules/Common/Recents/DataSources/RecentsDataSource.h # Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m # Riot/Modules/Common/Recents/RecentsViewController.h # Riot/Modules/Common/Recents/RecentsViewController.m # Riot/Modules/Common/Recents/Views/RecentTableViewCell.m # Riot/Modules/Common/SwiftUI/VectorHostingController.swift # Riot/Modules/Common/Toasts/RoundedToastView.swift # Riot/Modules/Common/Toasts/ToastViewState.swift # Riot/Modules/Common/UserIndicators/UserIndicatorPresenter.swift # Riot/Modules/Common/UserIndicators/UserIndicatorStore.swift # Riot/Modules/Common/UserIndicators/ViewPresenters/ToastViewPresenter.swift # Riot/Modules/Common/WebViewController/WebViewViewController.m # Riot/Modules/Communities/Home/GroupHomeViewController.m # Riot/Modules/Communities/Members/GroupParticipantsViewController.m # Riot/Modules/Communities/Rooms/GroupRoomsViewController.m # Riot/Modules/Contacts/ContactsTableViewController.m # Riot/Modules/Contacts/ContactsTableViewController.xib # Riot/Modules/Contacts/Details/ContactDetailsViewController.m # Riot/Modules/Contacts/Views/ContactTableViewCell.m # Riot/Modules/Contacts/Views/ContactTableViewCell.xib # Riot/Modules/ContextMenu/ActionProviders/RoomActionProvider.swift # Riot/Modules/ContextMenu/Services/RoomContextActionService.swift # Riot/Modules/CreateRoom/CreateRoomCoordinator.swift # Riot/Modules/CreateRoom/EnterNewRoomDetails/EnterNewRoomDetailsCoordinator.swift # Riot/Modules/CreateRoom/EnterNewRoomDetails/EnterNewRoomDetailsViewController.swift # Riot/Modules/CreateRoom/EnterNewRoomDetails/EnterNewRoomDetailsViewModel.swift # Riot/Modules/DeepLink/UniversalLinkParameters.swift # Riot/Modules/Favorites/FavouritesViewController.h # Riot/Modules/Favorites/FavouritesViewController.m # Riot/Modules/GlobalSearch/UnifiedSearchViewController.m # Riot/Modules/Home/HomeViewController.m # Riot/Modules/Home/Views/RoomCollectionViewCell.m # Riot/Modules/Integrations/WidgetPicker/WidgetPickerViewController.m # Riot/Modules/Integrations/Widgets/StickerPicker/StickerPickerViewController.m # Riot/Modules/KeyBackup/ManualExport/EncryptionKeysExportPresenter.swift # Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift # Riot/Modules/KeyVerification/Common/Verify/Scanning/KeyVerificationVerifyByScanningViewController.swift # Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitCoordinator.swift # Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewController.storyboard # Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewController.swift # Riot/Modules/KeyVerification/User/SessionStatus/UserVerificationSessionStatusViewController.swift # Riot/Modules/LocationSharing/LocationManager.swift # Riot/Modules/LocationSharing/UserLocationService.swift # Riot/Modules/LocationSharing/UserLocationServiceProvider.swift # Riot/Modules/MatrixKit/Categories/NSBundle+MatrixKit.m # Riot/Modules/MatrixKit/Controllers/MXKAccountDetailsViewController.m # Riot/Modules/MatrixKit/Controllers/MXKAuthenticationViewController.m # Riot/Modules/MatrixKit/Controllers/MXKRoomMemberDetailsViewController.h # Riot/Modules/MatrixKit/Controllers/MXKViewController.h # Riot/Modules/MatrixKit/Models/Account/MXKAccount.h # Riot/Modules/MatrixKit/Models/Account/MXKAccount.m # Riot/Modules/MatrixKit/Models/Account/MXKAccountManager.h # Riot/Modules/MatrixKit/Models/Account/MXKAccountManager.m # Riot/Modules/MatrixKit/Models/Contact/MXKContact.h # Riot/Modules/MatrixKit/Models/Room/MXKRoomBubbleCellData.h # Riot/Modules/MatrixKit/Models/Room/MXKRoomBubbleCellData.m # Riot/Modules/MatrixKit/Models/Room/MXKRoomBubbleCellDataStoring.h # Riot/Modules/MatrixKit/Models/Room/MXKRoomBubbleCellDataWithAppendingMode.m # Riot/Modules/MatrixKit/Models/Room/MXKRoomBubbleComponent.h # Riot/Modules/MatrixKit/Models/Room/MXKRoomBubbleComponent.m # Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m # Riot/Modules/MatrixKit/Models/Room/MXKSendReplyEventStringLocalizer.swift # Riot/Modules/MatrixKit/Utils/ErrorPresentation/MXKErrorPresentableBuilder.m # Riot/Modules/MatrixKit/Utils/EventFormatter/MXKEventFormatter.h # Riot/Modules/MatrixKit/Utils/EventFormatter/MXKEventFormatter.m # Riot/Modules/MatrixKit/Utils/MXKTools.h # Riot/Modules/MatrixKit/Utils/MXKTools.m # Riot/Modules/MatrixKit/Views/Account/MXKAccountTableViewCell.m # Riot/Modules/MatrixKit/Views/MXKTableViewCell/MXKTableViewCellWithLabelAndTextField.xib # Riot/Modules/MatrixKit/Views/MXKTableViewCell/MXKTableViewCellWithTextFieldAndButton.m # Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.m # Riot/Modules/MatrixKit/Views/RoomMemberList/MXKRoomMemberTableViewCell.m # Riot/Modules/MediaPicker/MediaPickerViewController.m # Riot/Modules/MediaPicker/SingleImagePickerPresenter.swift # Riot/Modules/MediaPickerV2/MediaPickerPresenter.swift # Riot/Modules/Onboarding/OnboardingCoordinator.swift # Riot/Modules/Onboarding/OnboardingCoordinatorBridgePresenter.swift # Riot/Modules/Onboarding/OnboardingCoordinatorProtocol.swift # Riot/Modules/People/PeopleViewController.h # Riot/Modules/People/PeopleViewController.m # Riot/Modules/Pills/PillTextAttachment.swift # Riot/Modules/Pills/PillsFormatter.swift # Riot/Modules/QRCode/QRCodeGenerator.swift # Riot/Modules/Room/CellData/RoomBubbleCellData.m # Riot/Modules/Room/ContextualMenu/ReactionsMenu/ReactionsMenuViewModel.swift # Riot/Modules/Room/CreationModal/RoomCreationEventsModal/RoomCreationEventsModalCoordinator.swift # Riot/Modules/Room/CreationModal/RoomCreationEventsModal/RoomCreationEventsModalViewModel.swift # Riot/Modules/Room/CreationModal/RoomCreationModalCoordinatorBridgePresenter.swift # Riot/Modules/Room/DataSources/RoomDataSource.m # Riot/Modules/Room/DataSources/RoomDataSource.swift # Riot/Modules/Room/EditHistory/EditHistoryViewModel.swift # Riot/Modules/Room/Files/RoomFilesViewController.m # Riot/Modules/Room/Location/RoomTimelineLocationView.swift # Riot/Modules/Room/Location/RoomTimelineLocationView.xib # Riot/Modules/Room/MXKRoomViewController.h # Riot/Modules/Room/MXKRoomViewController.m # Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.h # Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m # Riot/Modules/Room/Members/RoomParticipantsViewController.h # Riot/Modules/Room/Members/RoomParticipantsViewController.m # Riot/Modules/Room/ParticipantsInviteModal/ContactsPicker/ContactsPickerViewModel.swift # Riot/Modules/Room/RoomCoordinator.swift # Riot/Modules/Room/RoomInfo/RoomInfoCoordinator.swift # Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewAction.swift # Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift # Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewModel.swift # Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewModelType.swift # Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewState.swift # Riot/Modules/Room/RoomInfo/RoomInfoList/Views/RoomInfoBasicView.swift # Riot/Modules/Room/RoomViewController.m # Riot/Modules/Room/Settings/RoomSettingsViewController.m # Riot/Modules/Room/TimelineCells/BaseRoomCell/RoomCellContentView.xib # Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m # Riot/Modules/Room/TimelineCells/RoomCreationIntro/RoomCreationIntroCell.swift # Riot/Modules/Room/TimelineCells/RoomCreationIntro/RoomCreationIntroCellContentView.swift # Riot/Modules/Room/TimelineCells/RoomCreationIntro/RoomCreationIntroViewData.swift # Riot/Modules/Room/TimelineCells/RoomMembership/RoomMembershipCollapsedBubbleCell.m # Riot/Modules/Room/TimelineCells/RoomTimelineCellIdentifier.h # Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m # Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineStyle.swift # Riot/Modules/Room/TimelineCells/Styles/Bubble/Cells/FileWithoutThumbnail/Common/FileWithoutThumbnailBaseBubbleCell.swift # Riot/Modules/Room/TimelineCells/Styles/Bubble/Cells/FileWithoutThumbnail/Common/FileWithoutThumbnailCellContentView.swift # Riot/Modules/Room/TimelineCells/Styles/Bubble/Cells/FileWithoutThumbnail/Common/FileWithoutThumbnailCellContentView.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/FileAttachment/Incoming/Clear/RoomIncomingAttachmentBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/FileAttachment/Incoming/Clear/RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/FileAttachment/Incoming/Encrypted/RoomIncomingEncryptedAttachmentBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/FileAttachment/Incoming/Encrypted/RoomIncomingEncryptedAttachmentWithPaginationTitleBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/FileAttachment/Outgoing/Clear/RoomOutgoingAttachmentBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/FileAttachment/Outgoing/Clear/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/FileAttachment/Outgoing/Encrypted/RoomOutgoingEncryptedAttachmentBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/FileAttachment/Outgoing/Encrypted/RoomOutgoingEncryptedAttachmentWithPaginationTitleBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/Location/LocationPlainCell.swift # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/Poll/PollPlainCell.swift # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/Sticker/RoomSelectedStickerBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/TextMessage/Incoming/Clear/RoomIncomingTextMsgBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/TextMessage/Incoming/Clear/RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/TextMessage/Incoming/Encrypted/RoomIncomingEncryptedTextMsgBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/TextMessage/Incoming/Encrypted/RoomIncomingEncryptedTextMsgWithPaginationTitleBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/TextMessage/Outgoing/Clear/RoomOutgoingTextMsgBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/TextMessage/Outgoing/Clear/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/TextMessage/Outgoing/Encrypted/RoomOutgoingEncryptedTextMsgBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/TextMessage/Outgoing/Encrypted/RoomOutgoingEncryptedTextMsgWithPaginationTitleBubbleCell.xib # Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m # Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineStyle.swift # Riot/Modules/Room/TimelineCells/Styles/RoomTimelineStyle.swift # Riot/Modules/Room/TimelineDecorations/Reactions/RoomReactionActionViewCell.swift # Riot/Modules/Room/TimelineDecorations/Reactions/RoomReactionActionViewCell.xib # Riot/Modules/Room/TimelineDecorations/Reactions/RoomReactionViewCell.xib # Riot/Modules/Room/TimelineDecorations/Reactions/RoomReactionsView.swift # Riot/Modules/Room/TimelineDecorations/Reactions/RoomReactionsViewModel.swift # Riot/Modules/Room/TimelineDecorations/Reactions/RoomReactionsViewModelType.swift # Riot/Modules/Room/TimelineDecorations/Threads/Summary/ThreadSummaryView.swift # Riot/Modules/Room/VoiceMessages/VoiceMessageAudioConverter.swift # Riot/Modules/Room/VoiceMessages/VoiceMessageAudioRecorder.swift # Riot/Modules/Room/VoiceMessages/VoiceMessagePlaybackView.swift # Riot/Modules/Room/VoiceMessages/VoiceMessagePlaybackView.xib # Riot/Modules/Room/VoiceMessages/VoiceMessageToolbarView.swift # Riot/Modules/Rooms/RoomsViewController.h # Riot/Modules/Rooms/ShowDirectory/Cells/Network/DirectoryNetworkTableHeaderFooterView.swift # Riot/Modules/Rooms/ShowDirectory/Cells/Room/DirectoryRoomTableViewCell.swift # Riot/Modules/Rooms/ShowDirectory/Cells/Room/DirectoryRoomTableViewCell.xib # Riot/Modules/Rooms/ShowDirectory/PublicRoomsDirectoryViewModel.swift # Riot/Modules/Rooms/ShowDirectory/ShowDirectoryViewController.swift # Riot/Modules/Rooms/ShowDirectory/ShowDirectoryViewModel.swift # Riot/Modules/Secrets/Recover/RecoverWithKey/SecretsRecoveryWithKeyCoordinator.swift # Riot/Modules/Secrets/Recover/RecoverWithKey/SecretsRecoveryWithKeyViewController.swift # Riot/Modules/Secrets/Recover/RecoverWithPassphrase/SecretsRecoveryWithPassphraseCoordinator.swift # Riot/Modules/Secrets/Recover/RecoverWithPassphrase/SecretsRecoveryWithPassphraseViewController.swift # Riot/Modules/Secrets/Recover/SecretsRecoveryCoordinator.swift # Riot/Modules/Secrets/Reset/SecretsResetViewController.storyboard # Riot/Modules/Secrets/Reset/SecretsResetViewController.swift # Riot/Modules/Secrets/Setup/RecoveryKey/SecretsSetupRecoveryKeyViewController.swift # Riot/Modules/Secrets/Setup/RecoveryPassphrase/SecretsSetupRecoveryPassphraseViewController.storyboard # Riot/Modules/Secrets/Setup/RecoveryPassphrase/SecretsSetupRecoveryPassphraseViewController.swift # Riot/Modules/SecureBackup/Setup/Intro/SecureBackupSetupIntroViewController.swift # Riot/Modules/SecureBackup/Setup/Intro/SecureBackupSetupIntroViewModel.swift # Riot/Modules/SecureBackup/Setup/Intro/SecureBackupSetupIntroViewModelType.swift # Riot/Modules/SecureBackup/Setup/SecureBackupSetupCoordinator.swift # Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard # Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.swift # Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewModel.swift # Riot/Modules/SetPinCode/PinCodePreferences.swift # Riot/Modules/SetPinCode/SetPinCoordinator.swift # Riot/Modules/SetPinCode/SetPinCoordinatorBridgePresenter.swift # Riot/Modules/SetPinCode/SetupBiometrics/BiometricsAuthenticationPresenter.swift # Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsCoordinator.swift # Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewController.swift # Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewModel.swift # Riot/Modules/Settings/DeactivateAccount/DeactivateAccountViewController.m # Riot/Modules/Settings/Security/ManageSession/ManageSessionViewController.m # Riot/Modules/Settings/Security/SecurityViewController.m # Riot/Modules/Settings/SettingsViewController.m # Riot/Modules/SideMenu/SideMenuCoordinator.swift # Riot/Modules/SideMenu/SideMenuViewModel.swift # Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift # Riot/Modules/Spaces/SpaceMenu/SpaceMenuPresenter.swift # Riot/Modules/Spaces/SpaceMenu/SpaceMenuViewModel.swift # Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift # Riot/Modules/SplitView/SplitViewCoordinator.swift # Riot/Modules/SplitView/SplitViewCoordinatorType.swift # Riot/Modules/StartChat/StartChatViewController.m # Riot/Modules/TabBar/MasterTabBarController.h # Riot/Modules/TabBar/MasterTabBarController.m # Riot/Modules/TabBar/TabBarCoordinator.swift # Riot/Modules/TabBar/TabBarCoordinatorType.swift # Riot/Modules/Threads/ThreadList/ThreadListViewModel.swift # Riot/SupportingFiles/Info.plist # Riot/SupportingFiles/Riot-Bridging-Header.h # Riot/SupportingFiles/Riot.entitlements # Riot/Utils/EventFormatter+DTCoreTextFix.m # Riot/Utils/EventFormatter.m # Riot/Utils/Tools.h # Riot/Utils/Tools.m # Riot/Utils/URLValidator.swift # Riot/Utils/UniversalLink.h # Riot/Utils/UniversalLink.m # Riot/target.yml # RiotNSE/NotificationService.swift # RiotNSE/RiotNSE.entitlements # RiotNSE/target.yml # RiotShareExtension/Shared/View/ShareViewController.m # RiotShareExtension/SupportingFiles/Info.plist # RiotShareExtension/target.yml # RiotSwiftUI/Modules/AnalyticsPrompt/AnalyticsPromptViewModel.swift # RiotSwiftUI/Modules/AnalyticsPrompt/Coordinator/AnalyticsPromptCoordinator.swift # RiotSwiftUI/Modules/AnalyticsPrompt/Coordinator/AnalyticsPromptStrings.swift # RiotSwiftUI/Modules/AnalyticsPrompt/MockAnalyticsPromptScreenState.swift # RiotSwiftUI/Modules/AnalyticsPrompt/Test/UI/AnalyticsPromptUITests.swift # RiotSwiftUI/Modules/AnalyticsPrompt/View/AnalyticsPrompt.swift # RiotSwiftUI/Modules/AnalyticsPrompt/View/AnalyticsPromptCheckmarkItem.swift # RiotSwiftUI/Modules/Authentication/Common/AuthenticationHomeserverViewData.swift # RiotSwiftUI/Modules/Authentication/Common/AuthenticationModels.swift # RiotSwiftUI/Modules/Authentication/Common/AuthenticationServerInfoSection.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationRestClient.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationService.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationState.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/LoginModels.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/LoginParameters.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/LoginWizard.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/RegistrationParameters.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/RegistrationWizard.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/SessionCreator.swift # RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/ThreePIDModels.swift # RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginModels.swift # RiotSwiftUI/Modules/Authentication/Login/Coordinator/AuthenticationLoginCoordinator.swift # RiotSwiftUI/Modules/Authentication/Login/Test/UI/AuthenticationLoginUITests.swift # RiotSwiftUI/Modules/Authentication/Login/Test/Unit/AuthenticationLoginViewModelTests.swift # RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift # RiotSwiftUI/Modules/Authentication/ReCaptcha/Test/UI/AuthenticationReCaptchaUITests.swift # RiotSwiftUI/Modules/Authentication/ReCaptcha/View/AuthenticationReCaptchaScreen.swift # RiotSwiftUI/Modules/Authentication/ReCaptcha/View/AuthenticationReCaptchaWebView.swift # RiotSwiftUI/Modules/Authentication/Registration/AuthenticationRegistrationModels.swift # RiotSwiftUI/Modules/Authentication/Registration/AuthenticationRegistrationViewModel.swift # RiotSwiftUI/Modules/Authentication/Registration/AuthenticationRegistrationViewModelProtocol.swift # RiotSwiftUI/Modules/Authentication/Registration/Coordinator/AuthenticationRegistrationCoordinator.swift # RiotSwiftUI/Modules/Authentication/Registration/MockAuthenticationRegistrationScreenState.swift # RiotSwiftUI/Modules/Authentication/Registration/Test/UI/AuthenticationRegistrationUITests.swift # RiotSwiftUI/Modules/Authentication/Registration/Test/Unit/AuthenticationRegistrationViewModelTests.swift # RiotSwiftUI/Modules/Authentication/Registration/View/AuthenticationRegistrationScreen.swift # RiotSwiftUI/Modules/Authentication/ServerSelection/AuthenticationServerSelectionModels.swift # RiotSwiftUI/Modules/Authentication/ServerSelection/AuthenticationServerSelectionViewModel.swift # RiotSwiftUI/Modules/Authentication/ServerSelection/Coordinator/AuthenticationServerSelectionCoordinator.swift # RiotSwiftUI/Modules/Authentication/ServerSelection/MockAuthenticationServerSelectionScreenState.swift # RiotSwiftUI/Modules/Authentication/ServerSelection/Test/UI/AuthenticationServerSelectionUITests.swift # RiotSwiftUI/Modules/Authentication/ServerSelection/Test/Unit/AuthenticationServerSelectionViewModelTests.swift # RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift # RiotSwiftUI/Modules/Authentication/Terms/AuthenticationTermsModels.swift # RiotSwiftUI/Modules/Authentication/Terms/AuthenticationTermsViewModel.swift # RiotSwiftUI/Modules/Authentication/Terms/Coordinator/AuthenticationTermsCoordinator.swift # RiotSwiftUI/Modules/Authentication/Terms/MockAuthenticationTermsScreenState.swift # RiotSwiftUI/Modules/Authentication/Terms/Test/UI/AuthenticationTermsUITests.swift # RiotSwiftUI/Modules/Authentication/Terms/View/AuthenticationTermsScreen.swift # RiotSwiftUI/Modules/Authentication/Terms/View/AuthenticationTermsToggleStyle.swift # RiotSwiftUI/Modules/Authentication/VerifyEmail/AuthenticationVerifyEmailModels.swift # RiotSwiftUI/Modules/Authentication/VerifyEmail/AuthenticationVerifyEmailViewModel.swift # RiotSwiftUI/Modules/Authentication/VerifyEmail/Coordinator/AuthenticationVerifyEmailCoordinator.swift # RiotSwiftUI/Modules/Authentication/VerifyEmail/MockAuthenticationVerifyEmailScreenState.swift # RiotSwiftUI/Modules/Authentication/VerifyEmail/Test/UI/AuthenticationVerifyEmailUITests.swift # RiotSwiftUI/Modules/Authentication/VerifyEmail/Test/Unit/AuthenticationVerifyEmailViewModelTests.swift # RiotSwiftUI/Modules/Authentication/VerifyEmail/View/AuthenticationVerifyEmailForm.swift # RiotSwiftUI/Modules/Authentication/VerifyEmail/View/AuthenticationVerifyEmailScreen.swift # RiotSwiftUI/Modules/Authentication/VerifyMsisdn/AuthenticationVerifyMsisdnModels.swift # RiotSwiftUI/Modules/Authentication/VerifyMsisdn/AuthenticationVerifyMsisdnViewModel.swift # RiotSwiftUI/Modules/Authentication/VerifyMsisdn/Coordinator/AuthenticationVerifyMsisdnCoordinator.swift # RiotSwiftUI/Modules/Authentication/VerifyMsisdn/MockAuthenticationVerifyMsisdnScreenState.swift # RiotSwiftUI/Modules/Authentication/VerifyMsisdn/Test/UI/AuthenticationVerifyMsisdnUITests.swift # RiotSwiftUI/Modules/Authentication/VerifyMsisdn/Test/Unit/AuthenticationVerifyMsisdnViewModelTests.swift # RiotSwiftUI/Modules/Authentication/VerifyMsisdn/View/AuthenticationVerifyMsisdnForm.swift # RiotSwiftUI/Modules/Common/ActivityIndicator/ActivityIndicator.swift # RiotSwiftUI/Modules/Common/ActivityIndicator/ActivityIndicatorModifier.swift # RiotSwiftUI/Modules/Common/Avatar/Service/MatrixSDK/AvatarService.swift # RiotSwiftUI/Modules/Common/Avatar/Service/Mock/MockAvatarService.swift # RiotSwiftUI/Modules/Common/Avatar/View/AvatarImage.swift # RiotSwiftUI/Modules/Common/Avatar/View/PlaceholderAvatarImage.swift # RiotSwiftUI/Modules/Common/Avatar/View/SpaceAvatarImage.swift # RiotSwiftUI/Modules/Common/Avatar/ViewModel/AvatarServiceProtocol.swift # RiotSwiftUI/Modules/Common/Avatar/ViewModel/AvatarViewModel.swift # RiotSwiftUI/Modules/Common/Bridging/VectorContentView.swift # RiotSwiftUI/Modules/Common/DependencyInjection/DependencyContainerKey.swift # RiotSwiftUI/Modules/Common/EffectsScene/EffectsScene.swift # RiotSwiftUI/Modules/Common/EffectsScene/EffectsView.swift # RiotSwiftUI/Modules/Common/Extensions/Publisher.swift # RiotSwiftUI/Modules/Common/Mock/MockAppScreens.swift # RiotSwiftUI/Modules/Common/Mock/MockScreenState.swift # RiotSwiftUI/Modules/Common/Mock/ScreenList.swift # RiotSwiftUI/Modules/Common/Mock/ScreenStateInfo.swift # RiotSwiftUI/Modules/Common/Mock/StateRenderer.swift # RiotSwiftUI/Modules/Common/Test/UI/MockScreenTest.swift # RiotSwiftUI/Modules/Common/Test/UI/XCUIApplication+Riot.swift # RiotSwiftUI/Modules/Common/Test/XCTestPublisherExtensions.swift # RiotSwiftUI/Modules/Common/Theme/ThemeIdentifierExtensions.swift # RiotSwiftUI/Modules/Common/Theme/ThemeKey.swift # RiotSwiftUI/Modules/Common/Theme/ThemePublisher.swift # RiotSwiftUI/Modules/Common/Theme/ThemeSwiftUI.swift # RiotSwiftUI/Modules/Common/Theme/ThemeUsersColorsExtension.swift # RiotSwiftUI/Modules/Common/Theme/Themes/DarkThemeSwiftUI.swift # RiotSwiftUI/Modules/Common/Theme/Themes/DefaultThemeSwiftUI.swift # RiotSwiftUI/Modules/Common/Util/BorderModifier.swift # RiotSwiftUI/Modules/Common/Util/BorderedInputFieldStyle.swift # RiotSwiftUI/Modules/Common/Util/ClearViewModifier.swift # RiotSwiftUI/Modules/Common/Util/InlineTextButton.swift # RiotSwiftUI/Modules/Common/Util/MultilineTextField.swift # RiotSwiftUI/Modules/Common/Util/OptionButton.swift # RiotSwiftUI/Modules/Common/Util/PrimaryActionButtonStyle.swift # RiotSwiftUI/Modules/Common/Util/RadioButton.swift # RiotSwiftUI/Modules/Common/Util/RoundedBorderTextEditor.swift # RiotSwiftUI/Modules/Common/Util/RoundedBorderTextField.swift # RiotSwiftUI/Modules/Common/Util/RoundedCornerShape.swift # RiotSwiftUI/Modules/Common/Util/SafeBindingCollectionEnumerator.swift # RiotSwiftUI/Modules/Common/Util/ScreenTrackerViewModifier.swift # RiotSwiftUI/Modules/Common/Util/SearchBar.swift # RiotSwiftUI/Modules/Common/Util/SecondaryActionButtonStyle.swift # RiotSwiftUI/Modules/Common/Util/StyledText.swift # RiotSwiftUI/Modules/Common/Util/ThemableButton.swift # RiotSwiftUI/Modules/Common/Util/ThemableNavigationBar.swift # RiotSwiftUI/Modules/Common/Util/ThemableTextEditor.swift # RiotSwiftUI/Modules/Common/Util/ThemableTextField.swift # RiotSwiftUI/Modules/Common/Util/WaitOverlay.swift # RiotSwiftUI/Modules/Common/ViewFrameReader/FramePreferenceKey.swift # RiotSwiftUI/Modules/Common/ViewFrameReader/ViewFrameReader.swift # RiotSwiftUI/Modules/Common/ViewModel/StateStoreViewModel.swift # RiotSwiftUI/Modules/Onboarding/Avatar/Coordinator/OnboardingAvatarCoordinator.swift # RiotSwiftUI/Modules/Onboarding/Avatar/MockOnboardingAvatarScreenState.swift # RiotSwiftUI/Modules/Onboarding/Avatar/Test/UI/OnboardingAvatarUITests.swift # RiotSwiftUI/Modules/Onboarding/Avatar/Test/Unit/OnboardingAvatarViewModelTests.swift # RiotSwiftUI/Modules/Onboarding/Celebration/Test/UI/OnboardingCelebrationUITests.swift # RiotSwiftUI/Modules/Onboarding/Celebration/View/OnboardingCelebrationScreen.swift # RiotSwiftUI/Modules/Onboarding/Common/OnboardingIcon.swift # RiotSwiftUI/Modules/Onboarding/Common/OnboardingMetrics.swift # RiotSwiftUI/Modules/Onboarding/Congratulations/OnboardingCongratulationsModels.swift # RiotSwiftUI/Modules/Onboarding/Congratulations/Test/UI/OnboardingCongratulationsUITests.swift # RiotSwiftUI/Modules/Onboarding/Congratulations/View/OnboardingCongratulationsScreen.swift # RiotSwiftUI/Modules/Onboarding/DisplayName/Coordinator/OnboardingDisplayNameCoordinator.swift # RiotSwiftUI/Modules/Onboarding/DisplayName/Test/UI/OnboardingDisplayNameUITests.swift # RiotSwiftUI/Modules/Onboarding/DisplayName/View/OnboardingDisplayNameScreen.swift # RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenModels.swift # RiotSwiftUI/Modules/Onboarding/SplashScreen/View/OnboardingSplashScreen.swift # RiotSwiftUI/Modules/Onboarding/SplashScreen/View/OnboardingSplashScreenPage.swift # RiotSwiftUI/Modules/Onboarding/SplashScreen/View/OnboardingSplashScreenPageIndicator.swift # RiotSwiftUI/Modules/Onboarding/UseCase/Coordinator/OnboardingUseCaseSelectionCoordinator.swift # RiotSwiftUI/Modules/Onboarding/UseCase/OnboardingUseCaseModels.swift # RiotSwiftUI/Modules/Onboarding/UseCase/Test/UI/OnboardingUseCaseUITests.swift # RiotSwiftUI/Modules/Onboarding/UseCase/View/OnboardingUseCaseSelectionScreen.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/Coordinator/LiveLocationSharingViewerCoordinator.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/LiveLocationSharingViewerModels.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/LiveLocationSharingViewerViewModel.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/LiveLocationSharingViewerViewModelProtocol.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/MockLiveLocationSharingViewerScreenState.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/Service/LiveLocationSharingViewerServiceProtocol.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/Service/MatrixSDK/LiveLocationSharingViewerService.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/Service/Mock/MockLiveLocationSharingViewerService.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/Test/UI/LiveLocationSharingViewerUITests.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/Test/Unit/LiveLocationSharingViewerViewModelTests.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/View/LiveLocationListItem.swift # RiotSwiftUI/Modules/Room/LiveLocationSharingViewer/View/LiveLocationSharingViewer.swift # RiotSwiftUI/Modules/Room/LocationSharing/Coordinator/LocationSharingCoordinator.swift # RiotSwiftUI/Modules/Room/LocationSharing/LocationSharingModels.swift # RiotSwiftUI/Modules/Room/LocationSharing/LocationSharingScreenState.swift # RiotSwiftUI/Modules/Room/LocationSharing/LocationSharingViewModel.swift # RiotSwiftUI/Modules/Room/LocationSharing/Service/MatrixSDK/LocationSharingService.swift # RiotSwiftUI/Modules/Room/LocationSharing/Service/Mock/MockLocationSharingService.swift # RiotSwiftUI/Modules/Room/LocationSharing/Test/UI/LocationSharingUITests.swift # RiotSwiftUI/Modules/Room/LocationSharing/Test/Unit/LocationSharingViewModelTests.swift # RiotSwiftUI/Modules/Room/LocationSharing/View/LocationSharingMapView.swift # RiotSwiftUI/Modules/Room/LocationSharing/View/LocationSharingMarkerView.swift # RiotSwiftUI/Modules/Room/LocationSharing/View/LocationSharingOptionButton.swift # RiotSwiftUI/Modules/Room/LocationSharing/View/LocationSharingView.swift # RiotSwiftUI/Modules/Room/LocationSharing/View/MapCreditsView.swift # RiotSwiftUI/Modules/Room/LocationSharing/View/UserLocationAnnotationView.swift # RiotSwiftUI/Modules/Room/NotificationSettings/Coordinator/RoomNotificationSettingsCoordinator.swift # RiotSwiftUI/Modules/Room/NotificationSettings/View/FormItemButtonStyle.swift # RiotSwiftUI/Modules/Room/NotificationSettings/View/FormPickerItem.swift # RiotSwiftUI/Modules/Room/NotificationSettings/View/FormSectionFooter.swift # RiotSwiftUI/Modules/Room/NotificationSettings/View/FormSectionHeader.swift # RiotSwiftUI/Modules/Room/NotificationSettings/View/RoomNotificationSettings.swift # RiotSwiftUI/Modules/Room/NotificationSettings/View/RoomNotificationSettingsHeader.swift # RiotSwiftUI/Modules/Room/NotificationSettings/View/VectorForm.swift # RiotSwiftUI/Modules/Room/NotificationSettings/ViewModel/RoomNotificationSettingsSwiftUIViewModel.swift # RiotSwiftUI/Modules/Room/PollEditForm/Coordinator/PollEditFormCoordinator.swift # RiotSwiftUI/Modules/Room/PollEditForm/PollEditFormScreenState.swift # RiotSwiftUI/Modules/Room/PollEditForm/PollEditFormViewModel.swift # RiotSwiftUI/Modules/Room/PollEditForm/Test/UI/PollEditFormUITests.swift # RiotSwiftUI/Modules/Room/PollEditForm/Test/Unit/PollEditFormViewModelTests.swift # RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditForm.swift # RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormAnswerOptionView.swift # RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift # RiotSwiftUI/Modules/Room/RoomAccess/Coordinator/RoomAccessCoordinator.swift # RiotSwiftUI/Modules/Room/RoomAccess/Coordinator/RoomAccessCoordinatorBridgePresenter.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/Coordinator/RoomAccessTypeChooserCoordinator.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/MockRoomAccessTypeChooserScreenState.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/RoomAccessTypeChooserViewModel.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/RoomAccessTypeChooserViewModelProtocol.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/Service/MatrixSDK/RoomAccessTypeChooserService.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/Service/Mock/MockRoomAccessTypeChooserService.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/Service/RoomAccessTypeChooserServiceProtocol.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/Test/UI/RoomAccessTypeChooserUITests.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/Test/Unit/RoomAccessTypeChooserViewModelTests.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/View/RoomAccessTypeChooser.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/View/RoomAccessTypeChooserRow.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomRestrictedAccessSpaceChooser/Coordinator/RoomRestrictedAccessSpaceChooserViewProvider.swift # RiotSwiftUI/Modules/Room/RoomAccess/RoomRestrictedAccessSpaceChooser/View/RoomRestrictedAccessSpaceChooserSelector.swift # RiotSwiftUI/Modules/Room/RoomSuggestion/Coordinator/RoomSuggestionCoordinator.swift # RiotSwiftUI/Modules/Room/RoomSuggestion/Coordinator/RoomSuggestionCoordinatorBridgePresenter.swift # RiotSwiftUI/Modules/Room/RoomSuggestion/RoomSuggestionSpaceChooser/Coordinator/RoomSuggestionSpaceChooserViewProvider.swift # RiotSwiftUI/Modules/Room/RoomSuggestion/RoomSuggestionSpaceChooser/View/RoomSuggestionSpaceChooserSelector.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/Coordinator/RoomUpgradeCoordinator.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/MockRoomUpgradeScreenState.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/RoomUpgradeViewModel.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/RoomUpgradeViewModelProtocol.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/Service/MatrixSDK/RoomUpgradeService.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/Service/Mock/MockRoomUpgradeService.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/Service/RoomUpgradeServiceProtocol.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/Test/UI/RoomUpgradeUITests.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/Test/Unit/RoomUpgradeViewModelTests.swift # RiotSwiftUI/Modules/Room/RoomUpgrade/View/RoomUpgrade.swift # RiotSwiftUI/Modules/Room/StaticLocationSharingViewer/Coordinator/StaticLocationViewingCoordinator.swift # RiotSwiftUI/Modules/Room/StaticLocationSharingViewer/MockStaticLocationViewingScreenState.swift # RiotSwiftUI/Modules/Room/StaticLocationSharingViewer/StaticLocationViewingModels.swift # RiotSwiftUI/Modules/Room/StaticLocationSharingViewer/StaticLocationViewingViewModel.swift # RiotSwiftUI/Modules/Room/StaticLocationSharingViewer/StaticLocationViewingViewModelProtocol.swift # RiotSwiftUI/Modules/Room/StaticLocationSharingViewer/Test/UI/StaticLocationViewingUITests.swift # RiotSwiftUI/Modules/Room/StaticLocationSharingViewer/Test/Unit/StaticLocationViewingViewModelTests.swift # RiotSwiftUI/Modules/Room/StaticLocationSharingViewer/View/StaticLocationView.swift # RiotSwiftUI/Modules/Room/TimelinePoll/Coordinator/TimelinePollCoordinator.swift # RiotSwiftUI/Modules/Room/TimelinePoll/Coordinator/TimelinePollProvider.swift # RiotSwiftUI/Modules/Room/TimelinePoll/Test/UI/TimelinePollUITests.swift # RiotSwiftUI/Modules/Room/TimelinePoll/Test/Unit/TimelinePollViewModelTests.swift # RiotSwiftUI/Modules/Room/TimelinePoll/TimelinePollScreenState.swift # RiotSwiftUI/Modules/Room/TimelinePoll/TimelinePollViewModel.swift # RiotSwiftUI/Modules/Room/TimelinePoll/TimelinePollViewModelProtocol.swift # RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollAnswerOptionButton.swift # RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollView.swift # RiotSwiftUI/Modules/Room/UserSuggestion/Coordinator/UserSuggestionCoordinator.swift # RiotSwiftUI/Modules/Room/UserSuggestion/Coordinator/UserSuggestionCoordinatorBridge.swift # RiotSwiftUI/Modules/Room/UserSuggestion/Service/UserSuggestionService.swift # RiotSwiftUI/Modules/Room/UserSuggestion/Service/UserSuggestionServiceProtocol.swift # RiotSwiftUI/Modules/Room/UserSuggestion/Test/UI/UserSuggestionUITests.swift # RiotSwiftUI/Modules/Room/UserSuggestion/Test/Unit/UserSuggestionServiceTests.swift # RiotSwiftUI/Modules/Room/UserSuggestion/UserSuggestionScreenState.swift # RiotSwiftUI/Modules/Room/UserSuggestion/UserSuggestionViewModel.swift # RiotSwiftUI/Modules/Room/UserSuggestion/View/UserSuggestionList.swift # RiotSwiftUI/Modules/Room/UserSuggestion/View/UserSuggestionListItem.swift # RiotSwiftUI/Modules/Room/UserSuggestion/View/UserSuggestionListWithInput.swift # RiotSwiftUI/Modules/Settings/Notifications/Coordinator/NotificationSettingsBridgePresenter.swift # RiotSwiftUI/Modules/Settings/Notifications/Coordinator/NotificationSettingsCoordinator.swift # RiotSwiftUI/Modules/Settings/Notifications/Model/NotificationSettingsScreen.swift # RiotSwiftUI/Modules/Settings/Notifications/Service/MatrixSDK/MXNotificationSettingsService.swift # RiotSwiftUI/Modules/Settings/Notifications/Service/Mock/MockNotificationSettingsService.swift # RiotSwiftUI/Modules/Settings/Notifications/Service/NotificationSettingsServiceType.swift # RiotSwiftUI/Modules/Settings/Notifications/View/Chip.swift # RiotSwiftUI/Modules/Settings/Notifications/View/Chips.swift # RiotSwiftUI/Modules/Settings/Notifications/View/ChipsInput.swift # RiotSwiftUI/Modules/Settings/Notifications/View/DefaultNotificationSettings.swift # RiotSwiftUI/Modules/Settings/Notifications/View/FormInputFieldStyle.swift # RiotSwiftUI/Modules/Settings/Notifications/View/MentionsAndKeywordNotificationSettings.swift # RiotSwiftUI/Modules/Settings/Notifications/View/NotificationSettings.swift # RiotSwiftUI/Modules/Settings/Notifications/View/NotificationSettingsKeywords.swift # RiotSwiftUI/Modules/Settings/Notifications/View/OtherNotificationSettings.swift # RiotSwiftUI/Modules/Settings/Notifications/ViewModel/NotificationSettingsViewModel.swift # RiotSwiftUI/Modules/Spaces/AddRoomSelector/Coordinator/AddRoomSelectorViewProvider.swift # RiotSwiftUI/Modules/Spaces/AddRoomSelector/View/AddRoomSelector.swift # RiotSwiftUI/Modules/Spaces/LeaveSpace/Coordinator/LeaveSpaceViewProvider.swift # RiotSwiftUI/Modules/Spaces/LeaveSpace/View/LeaveSpace.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Coordinator/MatrixItemChooserCoordinator.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MatrixItemChooserViewModel.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MatrixItemChooserViewModelProtocol.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MockMatrixItemChooserScreenState.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixItemChooserServiceProtocol.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserService.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/Mock/MockMatrixItemChooserService.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Test/UI/MatrixItemChooserUITests.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Test/Unit/MatrixItemChooserViewModelTests.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/View/MatrixItemChooser.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/View/MatrixItemChooserListRow.swift # RiotSwiftUI/Modules/Spaces/MatrixItemChooser/View/MatrixItemChooserSectionHeader.swift # RiotSwiftUI/Modules/Spaces/RoomAncestorSelector/Coordinator/RoomAncestorSelectorViewProvider.swift # RiotSwiftUI/Modules/Spaces/RoomAncestorSelector/View/RoomAncestorSelector.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/Coordinator/SpaceCreationCoordinator.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/Coordinator/SpaceCreationEmailInvitesCoordinator.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/Service/MatrixSDK/SpaceCreationEmailInvitesService.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/Service/Mock/MockSpaceCreationEmailInvitesScreenState.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/Service/Mock/MockSpaceCreationEmailInvitesService.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/Service/SpaceCreationEmailInvitesServiceProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/Test/UI/SpaceCreationEmailInvitesUITests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/Test/Unit/SpaceCreationEmailInvitesViewModelTests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/View/SpaceCreationEmailInvites.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/ViewModel/SpaceCreationEmailInvitesViewModel.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/ViewModel/SpaceCreationEmailInvitesViewModelProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMatrixItemChooser/Coordinator/SpaceCreationMatrixItemChooserViewProvider.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMatrixItemChooser/View/SpaceCreationMatrixItemChooser.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/Coordinator/SpaceCreationMenuCoordinator.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/Test/UI/SpaceCreationMenuUITests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/Test/Unit/SpaceCreationMenuViewModelTests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/View/SpaceCreationMenu.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/ViewModel/SpaceCreationMenuViewModel.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/ViewModel/SpaceCreationMenuViewModelProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/Coordinator/SpaceCreationPostProcessCoordinator.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/Service/MatrixSDK/SpaceCreationPostProcessService.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/Service/Mock/MockSpaceCreationPostProcessScreenState.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/Service/Mock/MockSpaceCreationPostProcessService.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/Service/SpaceCreationPostProcessServiceProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/Test/UI/SpaceCreationPostProcessUITests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/Test/Unit/SpaceCreationPostProcessViewModelTests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/View/SpaceCreationPostProcess.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/View/SpaceCreationPostProcessItem.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/ViewModel/SpaceCreationPostProcessViewModel.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/ViewModel/SpaceCreationPostProcessViewModelProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/Coordinator/SpaceCreationRoomsCoordinator.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/Service/Mock/MockSpaceCreationRoomsScreenState.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/Test/UI/SpaceCreationRoomsUITests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/Test/Unit/SpaceCreationRoomsViewModelTests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/View/SpaceCreationRooms.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/ViewModel/SpaceCreationRoomsViewModel.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/ViewModel/SpaceCreationRoomsViewModelProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/Coordinator/SpaceCreationSettingsCoordinator.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/Service/MatrixSDK/SpaceCreationSettingsService.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/Service/Mock/MockSpaceCreationSettingsScreenState.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/Service/Mock/MockSpaceCreationSettingsService.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/Service/SpaceCreationSettingsServiceProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/Test/UI/SpaceCreationSettingsUITests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/Test/Unit/SpaceCreationSettingsViewModelTests.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/View/SpaceCreationSettings.swift # RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/ViewModel/SpaceCreationSettingsViewModel.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/Coordinator/SpaceSettingsModalCoordinator.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/Coordinator/SpaceSettingsModalCoordinatorBridgePresenter.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Coordinator/SpaceSettingsCoordinator.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/MockSpaceSettingsScreenState.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Service/MatrixSDK/SpaceSettingsService.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Service/Mock/MockSpaceSettingsService.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Service/SpaceSettingsServiceProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/SpaceSettingsViewModel.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/SpaceSettingsViewModelProtocol.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Test/UI/SpaceSettingsUITests.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Test/Unit/SpaceSettingsViewModelTests.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/View/SpaceSettings.swift # RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/View/SpaceSettingsOptionListItem.swift # RiotSwiftUI/Modules/Template/SimpleScreenExample/Test/UI/TemplateSimpleScreenUITests.swift # RiotSwiftUI/Modules/Template/SimpleUserProfileExample/Test/UI/TemplateUserProfileUITests.swift # RiotSwiftUI/Modules/Template/TemplateAdvancedRoomsExample/TemplateRoomChat/Test/UI/TemplateRoomChatUITests.swift # RiotSwiftUI/Modules/Template/TemplateAdvancedRoomsExample/TemplateRoomList/Test/UI/TemplateRoomListUITests.swift # RiotSwiftUI/RiotSwiftUIApp.swift # RiotSwiftUI/target.yml # RiotSwiftUI/targetUITests.yml # RiotTests/MatrixKitTests/MXKEventFormatter+Tests.h # RiotTests/MatrixKitTests/MXKEventFormatterTests.m # RiotTests/MatrixKitTests/MXKRoomDataSourceTests.swift # RiotTests/MatrixKitTests/MatrixKitTests-Bridging-Header.h # RiotTests/Modules/Authentication/AuthenticationServiceTests.swift # RiotTests/OnboardingTests.swift # RiotTests/PillsFormatterTests.swift # RiotTests/target.yml # SiriIntents/IntentHandler.m # SiriIntents/target.yml # Tools/SwiftGen/swiftgen-config.yml # Tools/Templates/buildable/SimpleScreenTemplate/SimpleScreenTemplateViewController.storyboard # fastlane/.env.default # fastlane/Fastfile # project.yml
1623 lines
60 KiB
Objective-C
1623 lines
60 KiB
Objective-C
/*
|
|
Copyright 2015 OpenMarket Ltd
|
|
Copyright 2017 Vector Creations Ltd
|
|
Copyright (c) 2021 BWI GmbH
|
|
|
|
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 "RecentsDataSource.h"
|
|
|
|
#import "RecentCellData.h"
|
|
#import "SectionHeaderView.h"
|
|
|
|
#import "ThemeService.h"
|
|
|
|
#import "MXRoom+Riot.h"
|
|
#import "MXSession+Riot.h"
|
|
#import "NSArray+Element.h"
|
|
|
|
#import "GeneratedInterface-Swift.h"
|
|
|
|
#define RECENTSDATASOURCE_SECTION_DIRECTORY 0x01
|
|
#define RECENTSDATASOURCE_SECTION_INVITES 0x02
|
|
#define RECENTSDATASOURCE_SECTION_FAVORITES 0x04
|
|
#define RECENTSDATASOURCE_SECTION_CONVERSATIONS 0x08
|
|
#define RECENTSDATASOURCE_SECTION_LOWPRIORITY 0x10
|
|
#define RECENTSDATASOURCE_SECTION_SERVERNOTICE 0x20
|
|
#define RECENTSDATASOURCE_SECTION_PEOPLE 0x40
|
|
#define RECENTSDATASOURCE_SECTION_SUGGESTED 0x80
|
|
|
|
#define RECENTSDATASOURCE_DEFAULT_SECTION_HEADER_HEIGHT 30.0
|
|
|
|
NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSourceTapOnDirectoryServerChange";
|
|
|
|
@interface RecentsDataSource() <SecureBackupBannerCellDelegate, CrossSigningSetupBannerCellDelegate, RecentsListServiceDelegate>
|
|
{
|
|
dispatch_queue_t processingQueue;
|
|
|
|
NSInteger shrinkedSectionsBitMask;
|
|
|
|
NSMutableDictionary<NSString*, id> *roomTagsListenerByUserId;
|
|
|
|
// Timer to not refresh publicRoomsDirectoryDataSource on every keystroke.
|
|
NSTimer *publicRoomsTriggerTimer;
|
|
}
|
|
|
|
@property (nonatomic, strong, readwrite) RecentsDataSourceSections *sections;
|
|
@property (nonatomic, assign, readwrite) SecureBackupBannerDisplay secureBackupBannerDisplay;
|
|
@property (nonatomic, assign, readwrite) CrossSigningBannerDisplay crossSigningBannerDisplay;
|
|
|
|
@property (nonatomic, readwrite) id<RecentsListServiceProtocol> recentsListService;
|
|
|
|
@property (nonatomic, strong) CrossSigningService *crossSigningService;
|
|
|
|
@end
|
|
|
|
@implementation RecentsDataSource
|
|
@synthesize hiddenCellIndexPath, droppingCellIndexPath, droppingCellBackGroundView;
|
|
|
|
- (instancetype)initWithMatrixSession:(MXSession *)mxSession
|
|
recentsListService:(id<RecentsListServiceProtocol>)theRecentsListService
|
|
{
|
|
if (self = [super initWithMatrixSession:mxSession])
|
|
{
|
|
processingQueue = dispatch_queue_create("RecentsDataSource", DISPATCH_QUEUE_SERIAL);
|
|
|
|
_sections = [[RecentsDataSourceSections alloc] initWithSectionTypes:@[]];
|
|
_crossSigningBannerDisplay = CrossSigningBannerDisplayNone;
|
|
_secureBackupBannerDisplay = SecureBackupBannerDisplayNone;
|
|
|
|
_areSectionsShrinkable = YES;
|
|
shrinkedSectionsBitMask = 0;
|
|
|
|
roomTagsListenerByUserId = [[NSMutableDictionary alloc] init];
|
|
|
|
_crossSigningService = [CrossSigningService new];
|
|
|
|
// Set default data and view classes
|
|
[self registerCellDataClass:RecentCellData.class forCellIdentifier:kMXKRecentCellIdentifier];
|
|
|
|
[self registerSpaceServiceDidBuildGraphNotification];
|
|
self.recentsListService = theRecentsListService;
|
|
[self.recentsListService addDelegate:self];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)dealloc
|
|
{
|
|
[self unregisterSpaceServiceDidBuildGraphNotification];
|
|
}
|
|
|
|
#pragma mark - Properties
|
|
|
|
- (NSArray<id<MXRoomSummaryProtocol>> *)invitesCellDataArray
|
|
{
|
|
return self.recentsListService.invitedRoomListData.rooms;
|
|
}
|
|
- (NSArray<id<MXRoomSummaryProtocol>> *)favoriteCellDataArray
|
|
{
|
|
// bwi: for personal notes room
|
|
NSMutableArray<id<MXRoomSummaryProtocol>> *filteredArray = [NSMutableArray arrayWithArray:self.recentsListService.favoritedRoomListData.rooms];
|
|
|
|
if( _recentsDataSourceMode == RecentsDataSourceModeFavourites) {
|
|
PersonalNotesDefaultService *service = [[PersonalNotesDefaultService alloc] initWithMxSession:self.mxSession];
|
|
PersonalNotesSettings *settings = [[PersonalNotesSettings alloc] init];
|
|
|
|
if ([service personalNotesRoomId] && settings.personalNotesVisible) {
|
|
MXRoom* room = [self.mxSession roomWithRoomId:[service personalNotesRoomId]];
|
|
if (room) {
|
|
MXRoomSummary *summary = [self.mxSession roomSummaryWithRoomId:[service personalNotesRoomId]];
|
|
[filteredArray insertObject:summary atIndex:0];
|
|
}
|
|
}
|
|
}
|
|
|
|
return filteredArray;
|
|
}
|
|
- (NSArray<id<MXRoomSummaryProtocol>> *)peopleCellDataArray
|
|
{
|
|
return self.recentsListService.peopleRoomListData.rooms;
|
|
}
|
|
- (NSArray<id<MXRoomSummaryProtocol>> *)conversationCellDataArray
|
|
{
|
|
// bwi: for personal notes room
|
|
NSMutableArray<id<MXRoomSummaryProtocol>> *filteredArray = [NSMutableArray arrayWithCapacity:self.recentsListService.conversationRoomListData.rooms.count];
|
|
|
|
for ( id<MXRoomSummaryProtocol> object in self.recentsListService.conversationRoomListData.rooms) {
|
|
MXRoom* room = [self.mxSession roomWithRoomId:object.roomId];
|
|
if (!room.isPersonalNotesRoom) {
|
|
[filteredArray addObject:object];
|
|
}
|
|
}
|
|
|
|
return filteredArray;
|
|
}
|
|
- (NSArray<id<MXRoomSummaryProtocol>> *)lowPriorityCellDataArray
|
|
{
|
|
return self.recentsListService.lowPriorityRoomListData.rooms;
|
|
}
|
|
- (NSArray<id<MXRoomSummaryProtocol>> *)serverNoticeCellDataArray
|
|
{
|
|
return self.recentsListService.serverNoticeRoomListData.rooms;
|
|
}
|
|
- (NSArray<id<MXRoomSummaryProtocol>> *)suggestedRoomCellDataArray
|
|
{
|
|
return self.recentsListService.suggestedRoomListData.rooms;
|
|
}
|
|
|
|
- (NSInteger)totalVisibleItemCount
|
|
{
|
|
return self.recentsListService.totalVisibleItemCount;
|
|
}
|
|
|
|
- (DiscussionsCount *)favoriteMissedDiscussionsCount
|
|
{
|
|
return self.recentsListService.favoritedMissedDiscussionsCount;
|
|
}
|
|
|
|
- (DiscussionsCount *)directMissedDiscussionsCount
|
|
{
|
|
return self.recentsListService.peopleMissedDiscussionsCount;
|
|
}
|
|
|
|
- (DiscussionsCount *)groupMissedDiscussionsCount
|
|
{
|
|
return self.recentsListService.conversationMissedDiscussionsCount;
|
|
}
|
|
|
|
#pragma mark - Sections
|
|
|
|
- (RecentsDataSourceSections *)makeDataSourceSections
|
|
{
|
|
NSMutableArray *types = [NSMutableArray array];
|
|
if (self.crossSigningBannerDisplay != CrossSigningBannerDisplayNone)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypeCrossSigningBanner)];
|
|
}
|
|
else if (self.secureBackupBannerDisplay != SecureBackupBannerDisplayNone)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypeSecureBackupBanner)];
|
|
}
|
|
|
|
if (self.invitesCellDataArray.count > 0)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypeInvites)];
|
|
}
|
|
|
|
if (self.favoriteCellDataArray.count > 0 || _recentsDataSourceMode == RecentsDataSourceModeFavourites)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypeFavorites)];
|
|
}
|
|
|
|
if (self.peopleCellDataArray.count > 0 || _recentsDataSourceMode == RecentsDataSourceModeHome)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypePeople)];
|
|
}
|
|
|
|
// Keep visible the main rooms section even if it is empty, except on favourites screen.
|
|
if (self.conversationCellDataArray.count > 0 || _recentsDataSourceMode == RecentsDataSourceModeHome)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypeConversation)];
|
|
}
|
|
|
|
if (self.lowPriorityCellDataArray.count > 0)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypeLowPriority)];
|
|
}
|
|
|
|
if (self.serverNoticeCellDataArray.count > 0)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypeServerNotice)];
|
|
}
|
|
|
|
if (self.suggestedRoomCellDataArray.count > 0)
|
|
{
|
|
[types addObject:@(RecentsDataSourceSectionTypeSuggestedRooms)];
|
|
}
|
|
|
|
return [[RecentsDataSourceSections alloc] initWithSectionTypes:types.copy];
|
|
}
|
|
|
|
#pragma mark -
|
|
|
|
- (void)setDelegate:(id<MXKDataSourceDelegate>)delegate andRecentsDataSourceMode:(RecentsDataSourceMode)recentsDataSourceMode
|
|
{
|
|
// Update the configuration, the recentsDataSourceMode setter will force a refresh.
|
|
self.delegate = delegate;
|
|
self.recentsDataSourceMode = recentsDataSourceMode;
|
|
}
|
|
|
|
- (void)setRecentsDataSourceMode:(RecentsDataSourceMode)recentsDataSourceMode
|
|
{
|
|
_recentsDataSourceMode = recentsDataSourceMode;
|
|
|
|
// Register to key backup state changes only on in home mode.
|
|
if (recentsDataSourceMode == RecentsDataSourceModeHome)
|
|
{
|
|
[self registerKeyBackupStateDidChangeNotification];
|
|
}
|
|
else
|
|
{
|
|
[self unregisterKeyBackupStateDidChangeNotification];
|
|
}
|
|
|
|
[self updateSecureBackupBanner];
|
|
[self refreshCrossSigningBannerDisplay];
|
|
[self.recentsListService updateMode:_recentsDataSourceMode];
|
|
}
|
|
|
|
- (void)setCurrentSpace:(MXSpace *)currentSpace
|
|
{
|
|
super.currentSpace = currentSpace;
|
|
[self.recentsListService updateSpace:currentSpace];
|
|
}
|
|
|
|
- (UIView *)viewForStickyHeaderInSection:(NSInteger)section withFrame:(CGRect)frame inTableView:(UITableView*)tableView
|
|
{
|
|
UIView *stickyHeader;
|
|
|
|
NSInteger savedShrinkedSectionsBitMask = shrinkedSectionsBitMask;
|
|
if ([self.sections sectionTypeForSectionIndex:section] == RecentsDataSourceSectionTypeDirectory)
|
|
{
|
|
// Return the section header used when the section is shrinked
|
|
shrinkedSectionsBitMask = RECENTSDATASOURCE_SECTION_DIRECTORY;
|
|
}
|
|
|
|
stickyHeader = [self viewForHeaderInSection:section withFrame:frame inTableView:tableView];
|
|
|
|
shrinkedSectionsBitMask = savedShrinkedSectionsBitMask;
|
|
|
|
return stickyHeader;
|
|
}
|
|
|
|
#pragma mark - Space Service notifications
|
|
|
|
- (void)registerSpaceServiceDidBuildGraphNotification
|
|
{
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(spaceServiceDidBuildGraphNotification:) name:MXSpaceService.didBuildSpaceGraph object:nil];
|
|
}
|
|
|
|
- (void)spaceServiceDidBuildGraphNotification:(NSNotification*)notification
|
|
{
|
|
[self forceRefresh];
|
|
}
|
|
|
|
- (void)unregisterSpaceServiceDidBuildGraphNotification
|
|
{
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:MXSpaceService.didBuildSpaceGraph object:nil];
|
|
}
|
|
|
|
#pragma mark - Key backup setup banner
|
|
|
|
- (void)registerKeyBackupStateDidChangeNotification
|
|
{
|
|
// Check homeserver update in background
|
|
[self.mxSession.crypto.backup forceRefresh:nil failure:nil];
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyBackupStateDidChangeNotification:) name:kMXKeyBackupDidStateChangeNotification object:nil];
|
|
}
|
|
|
|
- (void)unregisterKeyBackupStateDidChangeNotification
|
|
{
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:kMXKeyBackupDidStateChangeNotification object:nil];
|
|
}
|
|
|
|
- (void)keyBackupStateDidChangeNotification:(NSNotification*)notification
|
|
{
|
|
if ([self updateSecureBackupBanner])
|
|
{
|
|
[self forceRefresh];
|
|
}
|
|
}
|
|
|
|
- (BOOL)updateSecureBackupBanner
|
|
{
|
|
SecureBackupBannerDisplay secureBackupBanner = SecureBackupBannerDisplayNone;
|
|
|
|
if (self.recentsDataSourceMode == RecentsDataSourceModeHome)
|
|
{
|
|
SecureBackupBannerPreferences *secureBackupBannersPreferences = SecureBackupBannerPreferences.shared;
|
|
|
|
// Display the banner only if we can set up 4S, if there are messages keys to backup and key backup is disabled
|
|
if (!secureBackupBannersPreferences.hideSetupBanner
|
|
&& [self.mxSession vc_canSetupSecureBackup]
|
|
&& self.mxSession.crypto.backup.hasKeysToBackup
|
|
&& self.mxSession.crypto.backup.state == MXKeyBackupStateDisabled)
|
|
{
|
|
MXLogDebug(@"[RecentsDataSource] updateSecureBackupBanner: Secure backup should be shown (crypto.backup.state = %lu)", (unsigned long)self.mxSession.crypto.backup.state);
|
|
secureBackupBanner = SecureBackupBannerDisplaySetup;
|
|
}
|
|
}
|
|
|
|
BOOL updated = (self.secureBackupBannerDisplay != secureBackupBanner);
|
|
|
|
self.secureBackupBannerDisplay = secureBackupBanner;
|
|
|
|
return updated;
|
|
}
|
|
|
|
- (void)hideKeyBackupBannerWithDisplay:(SecureBackupBannerDisplay)secureBackupBannerDisplay
|
|
{
|
|
SecureBackupBannerPreferences *keyBackupBannersPreferences = SecureBackupBannerPreferences.shared;
|
|
|
|
switch (secureBackupBannerDisplay) {
|
|
case SecureBackupBannerDisplaySetup:
|
|
keyBackupBannersPreferences.hideSetupBanner = YES;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
[self updateSecureBackupBanner];
|
|
[self forceRefresh];
|
|
}
|
|
|
|
#pragma mark - Cross-signing setup banner
|
|
|
|
- (void)refreshCrossSigningBannerDisplay
|
|
{
|
|
if (self.recentsDataSourceMode == RecentsDataSourceModeHome)
|
|
{
|
|
CrossSigningBannerPreferences *crossSigningBannerPreferences = CrossSigningBannerPreferences.shared;
|
|
|
|
if (!crossSigningBannerPreferences.hideSetupBanner)
|
|
{
|
|
[self.crossSigningService canSetupCrossSigningFor:self.mxSession success:^(BOOL canSetupCrossSigning) {
|
|
|
|
CrossSigningBannerDisplay crossSigningBannerDisplay = canSetupCrossSigning ? CrossSigningBannerDisplaySetup : CrossSigningBannerDisplayNone;
|
|
|
|
[self updateCrossSigningBannerDisplay:crossSigningBannerDisplay];
|
|
|
|
} failure:^(NSError * _Nonnull error) {
|
|
MXLogDebug(@"[RecentsDataSource] refreshCrossSigningBannerDisplay: Fail to verify if cross signing banner can be displayed");
|
|
}];
|
|
}
|
|
else
|
|
{
|
|
[self updateCrossSigningBannerDisplay:CrossSigningBannerDisplayNone];
|
|
}
|
|
}
|
|
else
|
|
{
|
|
[self updateCrossSigningBannerDisplay:CrossSigningBannerDisplayNone];
|
|
}
|
|
}
|
|
|
|
- (void)updateCrossSigningBannerDisplay:(CrossSigningBannerDisplay)crossSigningBannerDisplay
|
|
{
|
|
if (self.crossSigningBannerDisplay == crossSigningBannerDisplay)
|
|
{
|
|
return;
|
|
}
|
|
|
|
self.crossSigningBannerDisplay = crossSigningBannerDisplay;
|
|
[self forceRefresh];
|
|
}
|
|
|
|
|
|
- (void)hideCrossSigningBannerWithDisplay:(CrossSigningBannerDisplay)crossSigningBannerDisplay
|
|
{
|
|
CrossSigningBannerPreferences *crossSigningBannerPreferences = CrossSigningBannerPreferences.shared;
|
|
|
|
switch (crossSigningBannerDisplay) {
|
|
case CrossSigningBannerDisplaySetup:
|
|
crossSigningBannerPreferences.hideSetupBanner = YES;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
[self refreshCrossSigningBannerDisplay];
|
|
}
|
|
|
|
#pragma mark -
|
|
|
|
- (MXKSessionRecentsDataSource *)addMatrixSession:(MXSession *)mxSession
|
|
{
|
|
MXKSessionRecentsDataSource *recentsDataSource = [super addMatrixSession:mxSession];
|
|
|
|
// Initialise the public room directory data source
|
|
// Note that it is single matrix session only for now
|
|
if (!_publicRoomsDirectoryDataSource)
|
|
{
|
|
_publicRoomsDirectoryDataSource = [[PublicRoomsDirectoryDataSource alloc] initWithMatrixSession:mxSession];
|
|
_publicRoomsDirectoryDataSource.showNSFWRooms = RiotSettings.shared.showNSFWPublicRooms;
|
|
_publicRoomsDirectoryDataSource.delegate = self;
|
|
}
|
|
|
|
return recentsDataSource;
|
|
}
|
|
|
|
- (void)removeMatrixSession:(MXSession*)matrixSession
|
|
{
|
|
[super removeMatrixSession:matrixSession];
|
|
|
|
// sanity check
|
|
if (matrixSession.myUser && matrixSession.myUser.userId)
|
|
{
|
|
id roomTagListener = roomTagsListenerByUserId[matrixSession.myUser.userId];
|
|
|
|
if (roomTagListener)
|
|
{
|
|
[matrixSession removeListener:roomTagListener];
|
|
[roomTagsListenerByUserId removeObjectForKey:matrixSession.myUser.userId];
|
|
}
|
|
}
|
|
|
|
if (_publicRoomsDirectoryDataSource.mxSession == matrixSession)
|
|
{
|
|
[_publicRoomsDirectoryDataSource destroy];
|
|
_publicRoomsDirectoryDataSource = nil;
|
|
}
|
|
}
|
|
|
|
- (void)dataSource:(MXKDataSource*)dataSource didStateChange:(MXKDataSourceState)aState
|
|
{
|
|
if (dataSource == _publicRoomsDirectoryDataSource)
|
|
{
|
|
if ([self.sections contains:RecentsDataSourceSectionTypeDirectory] && !self.droppingCellIndexPath)
|
|
{
|
|
// TODO: We should only update the directory section
|
|
[self.delegate dataSource:self didCellChange:nil];
|
|
}
|
|
}
|
|
else
|
|
{
|
|
[super dataSource:dataSource didStateChange:aState];
|
|
|
|
if ((aState == MXKDataSourceStateReady) && dataSource.mxSession.myUser.userId)
|
|
{
|
|
// Register the room tags updates to refresh the favorites order
|
|
MXWeakify(self);
|
|
id roomTagsListener = [dataSource.mxSession listenToEventsOfTypes:@[kMXEventTypeStringRoomTag]
|
|
onEvent:^(MXEvent *event, MXTimelineDirection direction, id customObject) {
|
|
|
|
MXStrongifyAndReturnIfNil(self);
|
|
|
|
// Consider only live event
|
|
if (direction == MXTimelineDirectionForwards)
|
|
{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
[self forceRefresh];
|
|
|
|
});
|
|
}
|
|
|
|
}];
|
|
|
|
roomTagsListenerByUserId[dataSource.mxSession.myUser.userId] = roomTagsListener;
|
|
}
|
|
}
|
|
}
|
|
|
|
- (void)forceRefresh
|
|
{
|
|
// Refresh is disabled during drag&drop animation"
|
|
if (!self.droppingCellIndexPath)
|
|
{
|
|
[self.recentsListService refresh];
|
|
}
|
|
}
|
|
|
|
- (void)didMXSessionInviteRoomUpdate:(NSNotification *)notif
|
|
{
|
|
MXSession *mxSession = notif.object;
|
|
if ([self.mxSessions indexOfObject:mxSession] != NSNotFound)
|
|
{
|
|
[self forceRefresh];
|
|
}
|
|
}
|
|
|
|
#pragma mark - UITableViewDataSource
|
|
|
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
|
{
|
|
// Sanity check
|
|
if (tableView.tag != self.recentsDataSourceMode)
|
|
{
|
|
// The view controller of this table view is not the current selected one in the tab bar controller.
|
|
return 0;
|
|
}
|
|
|
|
// Check whether all data sources are ready before rendering recents
|
|
if (self.state != MXKDataSourceStateReady)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
self.sections = [self makeDataSourceSections];
|
|
return self.sections.count;
|
|
}
|
|
|
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
|
{
|
|
// Sanity check
|
|
if (tableView.tag != self.recentsDataSourceMode)
|
|
{
|
|
// The view controller of this table view is not the current selected one in the tab bar controller.
|
|
return 0;
|
|
}
|
|
|
|
NSUInteger count = 0;
|
|
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:section];
|
|
if (sectionType == RecentsDataSourceSectionTypeCrossSigningBanner && self.crossSigningBannerDisplay != CrossSigningBannerDisplayNone)
|
|
{
|
|
count = 1;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeSecureBackupBanner && self.secureBackupBannerDisplay != SecureBackupBannerDisplayNone)
|
|
{
|
|
count = 1;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeFavorites && !(shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_FAVORITES))
|
|
{
|
|
count = self.favoriteCellDataArray.count;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypePeople && !(shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_PEOPLE))
|
|
{
|
|
count = self.peopleCellDataArray.count ? self.peopleCellDataArray.count : 1;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeConversation && !(shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_CONVERSATIONS))
|
|
{
|
|
count = self.conversationCellDataArray.count ? self.conversationCellDataArray.count : 1;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeDirectory && !(shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_DIRECTORY))
|
|
{
|
|
count = [_publicRoomsDirectoryDataSource tableView:tableView numberOfRowsInSection:0];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeLowPriority && !(shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_LOWPRIORITY))
|
|
{
|
|
count = self.lowPriorityCellDataArray.count;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeServerNotice && !(shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_SERVERNOTICE))
|
|
{
|
|
count = self.serverNoticeCellDataArray.count;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeInvites && !(shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_INVITES))
|
|
{
|
|
count = self.invitesCellDataArray.count;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeSuggestedRooms && !(shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_SUGGESTED))
|
|
{
|
|
count = self.suggestedRoomCellDataArray.count;
|
|
}
|
|
|
|
// Adjust this count according to the potential dragged cell.
|
|
if ([self isMovingCellSection:section])
|
|
{
|
|
count++;
|
|
}
|
|
|
|
if (count && [self isHiddenCellSection:section])
|
|
{
|
|
count--;
|
|
}
|
|
|
|
return count;
|
|
}
|
|
|
|
- (CGFloat)heightForHeaderInSection:(NSInteger)section
|
|
{
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:section];
|
|
if (sectionType == RecentsDataSourceSectionTypeSecureBackupBanner || sectionType == RecentsDataSourceSectionTypeCrossSigningBanner)
|
|
{
|
|
return 0.0;
|
|
}
|
|
|
|
return RECENTSDATASOURCE_DEFAULT_SECTION_HEADER_HEIGHT;
|
|
}
|
|
|
|
- (NSAttributedString *)attributedStringForHeaderTitleInSection:(NSInteger)section
|
|
{
|
|
NSAttributedString *sectionTitle;
|
|
NSString *title;
|
|
NSUInteger count = 0;
|
|
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:section];
|
|
if (sectionType == RecentsDataSourceSectionTypeFavorites)
|
|
{
|
|
count = self.recentsListService.favoritedRoomListData.counts.total.numberOfRooms;
|
|
title = [VectorL10n roomRecentsFavouritesSection];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypePeople)
|
|
{
|
|
count = self.recentsListService.peopleRoomListData.counts.total.numberOfRooms;
|
|
title = [VectorL10n roomRecentsPeopleSection];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeConversation)
|
|
{
|
|
count = self.recentsListService.conversationRoomListData.counts.total.numberOfRooms;
|
|
|
|
if (_recentsDataSourceMode == RecentsDataSourceModePeople)
|
|
{
|
|
title = [VectorL10n peopleConversationSection];
|
|
}
|
|
else
|
|
{
|
|
title = [VectorL10n roomRecentsConversationsSection];
|
|
}
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeDirectory)
|
|
{
|
|
title = [VectorL10n roomRecentsDirectorySection];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeLowPriority)
|
|
{
|
|
count = self.recentsListService.lowPriorityRoomListData.counts.total.numberOfRooms;
|
|
title = [VectorL10n roomRecentsLowPrioritySection];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeServerNotice)
|
|
{
|
|
count = self.recentsListService.serverNoticeRoomListData.counts.total.numberOfRooms;
|
|
title = [VectorL10n roomRecentsServerNoticeSection];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeInvites)
|
|
{
|
|
count = self.recentsListService.invitedRoomListData.counts.total.numberOfRooms;
|
|
|
|
if (_recentsDataSourceMode == RecentsDataSourceModePeople)
|
|
{
|
|
title = [VectorL10n peopleInvitesSection];
|
|
}
|
|
else
|
|
{
|
|
title = [VectorL10n roomRecentsInvitesSection];
|
|
}
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeSuggestedRooms)
|
|
{
|
|
count = self.recentsListService.suggestedRoomListData.counts.total.numberOfRooms;
|
|
title = [VectorL10n roomRecentsSuggestedRoomsSection];
|
|
}
|
|
|
|
if (count && !(sectionType == RecentsDataSourceSectionTypeInvites))
|
|
{
|
|
NSString *roomCount = [NSString stringWithFormat:@" %tu", count];
|
|
|
|
NSMutableAttributedString *mutableSectionTitle = [[NSMutableAttributedString alloc] initWithString:title
|
|
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.headerTextPrimaryColor,
|
|
NSFontAttributeName: [UIFont boldSystemFontOfSize:15.0]}];
|
|
[mutableSectionTitle appendAttributedString:[[NSMutableAttributedString alloc] initWithString:roomCount
|
|
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.headerTextSecondaryColor,
|
|
NSFontAttributeName: [UIFont boldSystemFontOfSize:15.0]}]];
|
|
|
|
sectionTitle = mutableSectionTitle;
|
|
}
|
|
else if (title)
|
|
{
|
|
sectionTitle = [[NSAttributedString alloc] initWithString:title
|
|
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.headerTextPrimaryColor,
|
|
NSFontAttributeName: [UIFont boldSystemFontOfSize:15.0]}];
|
|
}
|
|
|
|
return sectionTitle;
|
|
}
|
|
|
|
- (UIView *)badgeViewForHeaderTitleInSection:(NSInteger)section
|
|
{
|
|
// Prepare a badge to display the total of missed notifications in this section.
|
|
id<MXRoomListDataCounts> counts = nil;
|
|
UIView *missedNotifAndUnreadBadgeBgView = nil;
|
|
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:section];
|
|
if (sectionType == RecentsDataSourceSectionTypeInvites)
|
|
{
|
|
counts = self.recentsListService.invitedRoomListData.counts;
|
|
}
|
|
if (sectionType == RecentsDataSourceSectionTypeFavorites)
|
|
{
|
|
counts = self.recentsListService.favoritedRoomListData.counts;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypePeople)
|
|
{
|
|
counts = self.recentsListService.peopleRoomListData.counts;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeConversation)
|
|
{
|
|
counts = self.recentsListService.conversationRoomListData.counts;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeLowPriority)
|
|
{
|
|
counts = self.recentsListService.lowPriorityRoomListData.counts;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeServerNotice)
|
|
{
|
|
counts = self.recentsListService.serverNoticeRoomListData.counts;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeSuggestedRooms)
|
|
{
|
|
counts = self.recentsListService.suggestedRoomListData.counts;
|
|
}
|
|
|
|
// Invites are counted as highlights for the badge view display.
|
|
NSUInteger numberOfNotifications = counts.total.numberOfNotifications + counts.total.numberOfInvitedRooms;
|
|
NSUInteger numberOfHighlights = counts.total.numberOfHighlights + counts.total.numberOfInvitedRooms;
|
|
|
|
if (numberOfNotifications)
|
|
{
|
|
UILabel *missedNotifAndUnreadBadgeLabel = [[UILabel alloc] init];
|
|
missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.baseTextPrimaryColor;
|
|
missedNotifAndUnreadBadgeLabel.font = [UIFont boldSystemFontOfSize:14];
|
|
if (numberOfNotifications > 1000)
|
|
{
|
|
CGFloat value = numberOfNotifications / 1000.0;
|
|
missedNotifAndUnreadBadgeLabel.text = [VectorL10n largeBadgeValueKFormat:value];
|
|
}
|
|
else
|
|
{
|
|
missedNotifAndUnreadBadgeLabel.text = [NSString stringWithFormat:@"%tu", numberOfNotifications];
|
|
}
|
|
|
|
[missedNotifAndUnreadBadgeLabel sizeToFit];
|
|
|
|
CGFloat bgViewWidth = missedNotifAndUnreadBadgeLabel.frame.size.width + 18;
|
|
|
|
BOOL highlight = numberOfHighlights > 0;
|
|
missedNotifAndUnreadBadgeBgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, bgViewWidth, 20)];
|
|
[missedNotifAndUnreadBadgeBgView.layer setCornerRadius:10];
|
|
missedNotifAndUnreadBadgeBgView.backgroundColor = highlight ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor;
|
|
|
|
[missedNotifAndUnreadBadgeBgView addSubview:missedNotifAndUnreadBadgeLabel];
|
|
missedNotifAndUnreadBadgeLabel.center = missedNotifAndUnreadBadgeBgView.center;
|
|
[missedNotifAndUnreadBadgeLabel.centerXAnchor constraintEqualToAnchor:missedNotifAndUnreadBadgeBgView.centerXAnchor
|
|
constant:0].active = YES;
|
|
[missedNotifAndUnreadBadgeLabel.centerYAnchor constraintEqualToAnchor:missedNotifAndUnreadBadgeBgView.centerYAnchor
|
|
constant:0].active = YES;
|
|
}
|
|
|
|
return missedNotifAndUnreadBadgeBgView;
|
|
}
|
|
|
|
- (UIView *)viewForHeaderInSection:(NSInteger)section withFrame:(CGRect)frame inTableView:(UITableView*)tableView
|
|
{
|
|
// No header view in key backup banner section
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:section];
|
|
if (sectionType == RecentsDataSourceSectionTypeSecureBackupBanner || sectionType == RecentsDataSourceSectionTypeCrossSigningBanner)
|
|
{
|
|
return nil;
|
|
}
|
|
|
|
SectionHeaderView *sectionHeader = [tableView dequeueReusableHeaderFooterViewWithIdentifier:SectionHeaderView.defaultReuseIdentifier];
|
|
if (sectionHeader == nil)
|
|
{
|
|
sectionHeader = [[SectionHeaderView alloc] initWithReuseIdentifier:SectionHeaderView.defaultReuseIdentifier];
|
|
}
|
|
sectionHeader.backgroundView = [UIView new];
|
|
sectionHeader.frame = frame;
|
|
sectionHeader.backgroundView.backgroundColor = ThemeService.shared.theme.headerBackgroundColor;
|
|
sectionHeader.topViewHeight = RECENTSDATASOURCE_DEFAULT_SECTION_HEADER_HEIGHT;
|
|
NSInteger sectionBitwise = 0;
|
|
|
|
if (_areSectionsShrinkable)
|
|
{
|
|
if (sectionType == RecentsDataSourceSectionTypeFavorites)
|
|
{
|
|
sectionBitwise = RECENTSDATASOURCE_SECTION_FAVORITES;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypePeople)
|
|
{
|
|
sectionBitwise = RECENTSDATASOURCE_SECTION_PEOPLE;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeConversation)
|
|
{
|
|
sectionBitwise = RECENTSDATASOURCE_SECTION_CONVERSATIONS;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeDirectory)
|
|
{
|
|
sectionBitwise = RECENTSDATASOURCE_SECTION_CONVERSATIONS;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeLowPriority)
|
|
{
|
|
sectionBitwise = RECENTSDATASOURCE_SECTION_LOWPRIORITY;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeServerNotice)
|
|
{
|
|
sectionBitwise = RECENTSDATASOURCE_SECTION_SERVERNOTICE;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeInvites)
|
|
{
|
|
sectionBitwise = RECENTSDATASOURCE_SECTION_INVITES;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeSuggestedRooms)
|
|
{
|
|
sectionBitwise = RECENTSDATASOURCE_SECTION_SUGGESTED;
|
|
}
|
|
}
|
|
|
|
if (sectionBitwise)
|
|
{
|
|
// Add shrink button
|
|
UIButton *shrinkButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
|
shrinkButton.backgroundColor = [UIColor clearColor];
|
|
[shrinkButton addTarget:self action:@selector(onButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
|
|
shrinkButton.tag = sectionBitwise;
|
|
sectionHeader.topSpanningView = shrinkButton;
|
|
sectionHeader.userInteractionEnabled = YES;
|
|
|
|
// Add shrink icon
|
|
UIImage *chevron;
|
|
if (shrinkedSectionsBitMask & sectionBitwise)
|
|
{
|
|
chevron = AssetImages.disclosureIcon.image;
|
|
}
|
|
else
|
|
{
|
|
chevron = AssetImages.shrinkIcon.image;
|
|
}
|
|
UIImageView *chevronView = [[UIImageView alloc] initWithImage:chevron];
|
|
chevronView.tintColor = ThemeService.shared.theme.textSecondaryColor;
|
|
chevronView.contentMode = UIViewContentModeCenter;
|
|
sectionHeader.accessoryView = chevronView;
|
|
}
|
|
if (_recentsDataSourceMode == RecentsDataSourceModeHome
|
|
|| _recentsDataSourceMode == RecentsDataSourceModePeople
|
|
|| _recentsDataSourceMode == RecentsDataSourceModeRooms)
|
|
{
|
|
// Add a badge to display the total of missed notifications by section.
|
|
UIView *badgeView = [self badgeViewForHeaderTitleInSection:section];
|
|
|
|
if (badgeView)
|
|
{
|
|
sectionHeader.rightAccessoryView = badgeView;
|
|
}
|
|
}
|
|
|
|
// Add label
|
|
frame.size.height = RECENTSDATASOURCE_DEFAULT_SECTION_HEADER_HEIGHT - 10;
|
|
UILabel *headerLabel = [[UILabel alloc] initWithFrame:frame];
|
|
headerLabel.backgroundColor = [UIColor clearColor];
|
|
headerLabel.attributedText = [self attributedStringForHeaderTitleInSection:section];
|
|
sectionHeader.headerLabel = headerLabel;
|
|
|
|
return sectionHeader;
|
|
}
|
|
|
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
|
{
|
|
// Sanity check
|
|
if (tableView.tag != self.recentsDataSourceMode)
|
|
{
|
|
// The view controller of this table view is not the current selected one in the tab bar controller.
|
|
// Return a fake cell to prevent app from crashing
|
|
return [[UITableViewCell alloc] init];
|
|
}
|
|
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:indexPath.section];
|
|
if (sectionType == RecentsDataSourceSectionTypeCrossSigningBanner)
|
|
{
|
|
CrossSigningSetupBannerCell* crossSigningSetupBannerCell = [tableView dequeueReusableCellWithIdentifier:CrossSigningSetupBannerCell.defaultReuseIdentifier forIndexPath:indexPath];
|
|
crossSigningSetupBannerCell.delegate = self;
|
|
return crossSigningSetupBannerCell;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeSecureBackupBanner)
|
|
{
|
|
SecureBackupBannerCell* keyBackupBannerCell = [tableView dequeueReusableCellWithIdentifier:SecureBackupBannerCell.defaultReuseIdentifier forIndexPath:indexPath];
|
|
[keyBackupBannerCell configureFor:self.secureBackupBannerDisplay];
|
|
keyBackupBannerCell.delegate = self;
|
|
return keyBackupBannerCell;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeDirectory)
|
|
{
|
|
NSIndexPath *indexPathInPublicRooms = [NSIndexPath indexPathForRow:indexPath.row inSection:0];
|
|
return [_publicRoomsDirectoryDataSource tableView:tableView cellForRowAtIndexPath:indexPathInPublicRooms];
|
|
}
|
|
else if (self.droppingCellIndexPath && [indexPath isEqual:self.droppingCellIndexPath])
|
|
{
|
|
static NSString* cellIdentifier = @"RiotRecentsMovingCell";
|
|
|
|
UITableViewCell* cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"RiotRecentsMovingCell"];
|
|
|
|
// add an imageview of the cell.
|
|
// The image is a shot of the genuine cell.
|
|
// Thus, this cell has the same look as the genuine cell without computing it.
|
|
UIImageView* imageView = [cell viewWithTag:[cellIdentifier hash]];
|
|
|
|
if (!imageView || (imageView != self.droppingCellBackGroundView))
|
|
{
|
|
if (imageView)
|
|
{
|
|
[imageView removeFromSuperview];
|
|
}
|
|
self.droppingCellBackGroundView.tag = [cellIdentifier hash];
|
|
[cell.contentView addSubview:self.droppingCellBackGroundView];
|
|
}
|
|
|
|
self.droppingCellBackGroundView.frame = self.droppingCellBackGroundView.frame;
|
|
cell.contentView.backgroundColor = [UIColor clearColor];
|
|
cell.backgroundColor = [UIColor clearColor];
|
|
|
|
return cell;
|
|
}
|
|
else if ((sectionType == RecentsDataSourceSectionTypeConversation && !self.conversationCellDataArray.count)
|
|
|| (sectionType == RecentsDataSourceSectionTypePeople && !self.peopleCellDataArray.count))
|
|
{
|
|
MXKTableViewCell *tableViewCell = [tableView dequeueReusableCellWithIdentifier:[MXKTableViewCell defaultReuseIdentifier]];
|
|
if (!tableViewCell)
|
|
{
|
|
tableViewCell = [[MXKTableViewCell alloc] init];
|
|
tableViewCell.textLabel.textColor = ThemeService.shared.theme.textSecondaryColor;
|
|
tableViewCell.textLabel.font = [UIFont systemFontOfSize:15.0];
|
|
tableViewCell.selectionStyle = UITableViewCellSelectionStyleNone;
|
|
}
|
|
|
|
// Check whether a search session is in progress
|
|
if (self.searchPatternsList)
|
|
{
|
|
tableViewCell.textLabel.text = [VectorL10n searchNoResult];
|
|
}
|
|
else if (_recentsDataSourceMode == RecentsDataSourceModePeople || sectionType == RecentsDataSourceSectionTypePeople)
|
|
{
|
|
tableViewCell.textLabel.text = [VectorL10n peopleNoConversation];
|
|
}
|
|
else
|
|
{
|
|
tableViewCell.textLabel.text = [VectorL10n roomRecentsNoConversation];
|
|
}
|
|
|
|
return tableViewCell;
|
|
}
|
|
|
|
return [super tableView:tableView cellForRowAtIndexPath:indexPath];
|
|
}
|
|
|
|
- (id<MXKRecentCellDataStoring>)cellDataAtIndexPath:(NSIndexPath *)indexPath
|
|
{
|
|
id<MXRoomSummaryProtocol> summary = nil;
|
|
NSUInteger cellDataIndex = indexPath.row;
|
|
NSInteger tableSection = indexPath.section;
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:tableSection];
|
|
|
|
// Compute the actual cell data index by taking into account the current droppingCellIndexPath and hiddenCellIndexPath (if any).
|
|
if ([self isMovingCellSection:tableSection] && (cellDataIndex > self.droppingCellIndexPath.row))
|
|
{
|
|
cellDataIndex --;
|
|
}
|
|
if ([self isHiddenCellSection:tableSection] && (cellDataIndex >= self.hiddenCellIndexPath.row))
|
|
{
|
|
cellDataIndex ++;
|
|
}
|
|
|
|
if (sectionType == RecentsDataSourceSectionTypeFavorites)
|
|
{
|
|
if (cellDataIndex < self.favoriteCellDataArray.count)
|
|
{
|
|
summary = self.favoriteCellDataArray[cellDataIndex];
|
|
}
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypePeople)
|
|
{
|
|
if (cellDataIndex < self.peopleCellDataArray.count)
|
|
{
|
|
summary = self.peopleCellDataArray[cellDataIndex];
|
|
}
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeConversation)
|
|
{
|
|
if (cellDataIndex < self.conversationCellDataArray.count)
|
|
{
|
|
summary = self.conversationCellDataArray[cellDataIndex];
|
|
}
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeLowPriority)
|
|
{
|
|
if (cellDataIndex < self.lowPriorityCellDataArray.count)
|
|
{
|
|
summary = self.lowPriorityCellDataArray[cellDataIndex];
|
|
}
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeServerNotice)
|
|
{
|
|
if (cellDataIndex < self.serverNoticeCellDataArray.count)
|
|
{
|
|
summary = self.serverNoticeCellDataArray[cellDataIndex];
|
|
}
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeInvites)
|
|
{
|
|
if (cellDataIndex < self.invitesCellDataArray.count)
|
|
{
|
|
summary = self.invitesCellDataArray[cellDataIndex];
|
|
}
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeSuggestedRooms)
|
|
{
|
|
if (cellDataIndex < self.suggestedRoomCellDataArray.count)
|
|
{
|
|
summary = self.suggestedRoomCellDataArray[cellDataIndex];
|
|
}
|
|
}
|
|
|
|
if (summary)
|
|
{
|
|
return [[MXKRecentCellData alloc] initWithRoomSummary:summary dataSource:self];
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
- (CGFloat)cellHeightAtIndexPath:(NSIndexPath *)indexPath
|
|
{
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:indexPath.section];
|
|
if (sectionType == RecentsDataSourceSectionTypeDirectory)
|
|
{
|
|
return [_publicRoomsDirectoryDataSource cellHeightAtIndexPath:indexPath];
|
|
}
|
|
if (self.droppingCellIndexPath && [indexPath isEqual:self.droppingCellIndexPath])
|
|
{
|
|
return self.droppingCellBackGroundView.frame.size.height;
|
|
}
|
|
if ((sectionType == RecentsDataSourceSectionTypeConversation && !self.conversationCellDataArray.count)
|
|
|| (sectionType == RecentsDataSourceSectionTypePeople && !self.peopleCellDataArray.count))
|
|
{
|
|
return 50.0;
|
|
}
|
|
|
|
// Override this method here to use our own cellDataAtIndexPath
|
|
id<MXKRecentCellDataStoring> cellData = [self cellDataAtIndexPath:indexPath];
|
|
|
|
if (cellData && self.delegate)
|
|
{
|
|
Class<MXKCellRendering> class = [self.delegate cellViewClassForCellData:cellData];
|
|
|
|
return [class heightForCellData:cellData withMaximumWidth:0];
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
|
|
{
|
|
// Sanity check
|
|
if (tableView.tag != self.recentsDataSourceMode)
|
|
{
|
|
// The view controller of this table view is not the current selected one in the tab bar controller.
|
|
return NO;
|
|
}
|
|
|
|
// Invited rooms are not editable.
|
|
return ([self.sections sectionTypeForSectionIndex:indexPath.section] != RecentsDataSourceSectionTypeInvites);
|
|
}
|
|
|
|
#pragma mark -
|
|
|
|
- (NSInteger)cellIndexPosWithRoomId:(NSString*)roomId andMatrixSession:(MXSession*)matrixSession within:(NSArray<id<MXRoomSummaryProtocol>> *)summaries
|
|
{
|
|
if (!roomId || !matrixSession || !summaries.count || self.mxSession != matrixSession)
|
|
{
|
|
return NSNotFound;
|
|
}
|
|
return [summaries indexOfObjectPassingTest:^BOOL(id<MXRoomSummaryProtocol> _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
return [obj.roomId isEqualToString:roomId];
|
|
}];
|
|
}
|
|
|
|
- (NSIndexPath*)cellIndexPathWithRoomId:(NSString*)roomId andMatrixSession:(MXSession*)matrixSession
|
|
{
|
|
NSIndexPath *indexPath = nil;
|
|
NSInteger index;
|
|
|
|
if ([self.sections contains:RecentsDataSourceSectionTypeInvites])
|
|
{
|
|
index = [self cellIndexPosWithRoomId:roomId andMatrixSession:matrixSession within:self.invitesCellDataArray];
|
|
|
|
if (index != NSNotFound)
|
|
{
|
|
// Check whether the invitations are shrinked
|
|
if (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_INVITES)
|
|
{
|
|
return nil;
|
|
}
|
|
NSInteger sectionIndex = [self.sections sectionIndexForSectionType:RecentsDataSourceSectionTypeInvites];
|
|
indexPath = [NSIndexPath indexPathForRow:index inSection:sectionIndex];
|
|
}
|
|
}
|
|
|
|
if (!indexPath && ([self.sections contains:RecentsDataSourceSectionTypeFavorites]))
|
|
{
|
|
index = [self cellIndexPosWithRoomId:roomId andMatrixSession:matrixSession within:self.favoriteCellDataArray];
|
|
|
|
if (index != NSNotFound)
|
|
{
|
|
// Check whether the favorites are shrinked
|
|
if (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_FAVORITES)
|
|
{
|
|
return nil;
|
|
}
|
|
NSInteger sectionIndex = [self.sections sectionIndexForSectionType:RecentsDataSourceSectionTypeFavorites];
|
|
indexPath = [NSIndexPath indexPathForRow:index inSection:sectionIndex];
|
|
}
|
|
}
|
|
|
|
if (!indexPath && ([self.sections contains:RecentsDataSourceSectionTypePeople]))
|
|
{
|
|
index = [self cellIndexPosWithRoomId:roomId andMatrixSession:matrixSession within:self.peopleCellDataArray];
|
|
|
|
if (index != NSNotFound)
|
|
{
|
|
// Check whether the favorites are shrinked
|
|
if (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_PEOPLE)
|
|
{
|
|
return nil;
|
|
}
|
|
NSInteger sectionIndex = [self.sections sectionIndexForSectionType:RecentsDataSourceSectionTypePeople];
|
|
indexPath = [NSIndexPath indexPathForRow:index inSection:sectionIndex];
|
|
}
|
|
}
|
|
|
|
if (!indexPath && ([self.sections contains:RecentsDataSourceSectionTypeConversation]))
|
|
{
|
|
index = [self cellIndexPosWithRoomId:roomId andMatrixSession:matrixSession within:self.conversationCellDataArray];
|
|
|
|
if (index != NSNotFound)
|
|
{
|
|
// Check whether the conversations are shrinked
|
|
if (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_CONVERSATIONS)
|
|
{
|
|
return nil;
|
|
}
|
|
NSInteger sectionIndex = [self.sections sectionIndexForSectionType:RecentsDataSourceSectionTypeConversation];
|
|
indexPath = [NSIndexPath indexPathForRow:index inSection:sectionIndex];
|
|
}
|
|
}
|
|
|
|
if (!indexPath && ([self.sections contains:RecentsDataSourceSectionTypeLowPriority]))
|
|
{
|
|
index = [self cellIndexPosWithRoomId:roomId andMatrixSession:matrixSession within:self.lowPriorityCellDataArray];
|
|
|
|
if (index != NSNotFound)
|
|
{
|
|
// Check whether the low priority rooms are shrinked
|
|
if (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_LOWPRIORITY)
|
|
{
|
|
return nil;
|
|
}
|
|
NSInteger sectionIndex = [self.sections sectionIndexForSectionType:RecentsDataSourceSectionTypeLowPriority];
|
|
indexPath = [NSIndexPath indexPathForRow:index inSection:sectionIndex];
|
|
}
|
|
}
|
|
|
|
if (!indexPath && ([self.sections contains:RecentsDataSourceSectionTypeServerNotice]))
|
|
{
|
|
index = [self cellIndexPosWithRoomId:roomId andMatrixSession:matrixSession within:self.serverNoticeCellDataArray];
|
|
|
|
if (index != NSNotFound)
|
|
{
|
|
// Check whether the low priority rooms are shrinked
|
|
if (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_SERVERNOTICE)
|
|
{
|
|
return nil;
|
|
}
|
|
NSInteger sectionIndex = [self.sections sectionIndexForSectionType:RecentsDataSourceSectionTypeServerNotice];
|
|
indexPath = [NSIndexPath indexPathForRow:index inSection:sectionIndex];
|
|
}
|
|
}
|
|
|
|
if (!indexPath && ([self.sections contains:RecentsDataSourceSectionTypeSuggestedRooms]))
|
|
{
|
|
index = [self cellIndexPosWithRoomId:roomId andMatrixSession:matrixSession within:self.suggestedRoomCellDataArray];
|
|
|
|
if (index != NSNotFound)
|
|
{
|
|
// Check whether the low priority rooms are shrinked
|
|
if (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_SUGGESTED)
|
|
{
|
|
return nil;
|
|
}
|
|
NSInteger sectionIndex = [self.sections sectionIndexForSectionType:RecentsDataSourceSectionTypeSuggestedRooms];
|
|
indexPath = [NSIndexPath indexPathForRow:index inSection:sectionIndex];
|
|
}
|
|
}
|
|
|
|
return indexPath;
|
|
}
|
|
|
|
#pragma mark - MXKDataSourceDelegate
|
|
|
|
- (void)dataSource:(MXKDataSource*)dataSource didCellChange:(id)changes
|
|
{
|
|
// Refresh is disabled during drag&drop animation
|
|
if (self.droppingCellIndexPath)
|
|
{
|
|
return;
|
|
}
|
|
|
|
// FIXME : manage multi accounts
|
|
// to manage multi accounts
|
|
// this method in MXKInterleavedRecentsDataSource must be split in two parts
|
|
// 1 - the intervealing cells method
|
|
// 2 - [super dataSource:dataSource didCellChange:changes] call.
|
|
// the [self refreshRoomsSections] call should be done at the end of the 1- method
|
|
// so a dedicated method must be implemented in MXKInterleavedRecentsDataSource
|
|
// this class will inherit of this new method
|
|
// 1 - call [super thisNewMethod]
|
|
// 2 - call [self refreshRoomsSections]
|
|
|
|
// Call super to keep update readyRecentsDataSourceArray.
|
|
[super dataSource:dataSource didCellChange:changes];
|
|
}
|
|
|
|
#pragma mark - Drag & Drop handling
|
|
|
|
- (BOOL)isMovingCellSection:(NSInteger)section
|
|
{
|
|
return self.droppingCellIndexPath && (self.droppingCellIndexPath.section == section);
|
|
}
|
|
|
|
- (BOOL)isHiddenCellSection:(NSInteger)section
|
|
{
|
|
return self.hiddenCellIndexPath && (self.hiddenCellIndexPath.section == section);
|
|
}
|
|
|
|
#pragma mark - Action
|
|
|
|
- (IBAction)onButtonPressed:(id)sender
|
|
{
|
|
if ([sender isKindOfClass:[UIButton class]])
|
|
{
|
|
UIButton *shrinkButton = (UIButton*)sender;
|
|
NSInteger selectedSectionBit = shrinkButton.tag;
|
|
|
|
if (shrinkedSectionsBitMask & selectedSectionBit)
|
|
{
|
|
// Disclose the section
|
|
shrinkedSectionsBitMask &= ~selectedSectionBit;
|
|
}
|
|
else
|
|
{
|
|
// Shrink this section
|
|
shrinkedSectionsBitMask |= selectedSectionBit;
|
|
}
|
|
|
|
// Inform the delegate about the update
|
|
[self.delegate dataSource:self didCellChange:nil];
|
|
}
|
|
}
|
|
|
|
- (IBAction)onPublicRoomsSearchPatternUpdate:(id)sender
|
|
{
|
|
if (publicRoomsTriggerTimer)
|
|
{
|
|
NSString *searchPattern = publicRoomsTriggerTimer.userInfo;
|
|
|
|
[publicRoomsTriggerTimer invalidate];
|
|
publicRoomsTriggerTimer = nil;
|
|
|
|
_publicRoomsDirectoryDataSource.searchPattern = searchPattern;
|
|
[_publicRoomsDirectoryDataSource paginate:nil failure:nil];
|
|
}
|
|
}
|
|
|
|
#pragma mark - Action
|
|
|
|
- (IBAction)onDirectoryServerPickerTap:(UITapGestureRecognizer*)sender
|
|
{
|
|
[self.delegate dataSource:self didRecognizeAction:kRecentsDataSourceTapOnDirectoryServerChange inCell:nil userInfo:nil];
|
|
}
|
|
|
|
#pragma mark - Override MXKDataSource
|
|
|
|
- (void)destroy
|
|
{
|
|
[super destroy];
|
|
|
|
[publicRoomsTriggerTimer invalidate];
|
|
publicRoomsTriggerTimer = nil;
|
|
|
|
[self.recentsListService stop];
|
|
}
|
|
|
|
#pragma mark - Override MXKRecentsDataSource
|
|
|
|
- (void)searchWithPatterns:(NSArray *)patternsList
|
|
{
|
|
[super searchWithPatterns:patternsList];
|
|
|
|
NSString *searchPattern = [patternsList componentsJoinedByString:@" "];
|
|
|
|
[self.recentsListService updateQuery:searchPattern];
|
|
|
|
if (_publicRoomsDirectoryDataSource)
|
|
{
|
|
// Do not send a /publicRooms request for every keystroke
|
|
// Let user finish typing
|
|
[publicRoomsTriggerTimer invalidate];
|
|
publicRoomsTriggerTimer = [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(onPublicRoomsSearchPatternUpdate:) userInfo:searchPattern repeats:NO];
|
|
}
|
|
}
|
|
|
|
#pragma mark - drag and drop managemenent
|
|
|
|
- (BOOL)isDraggableCellAt:(NSIndexPath*)path
|
|
{
|
|
if (_recentsDataSourceMode == RecentsDataSourceModePeople || _recentsDataSourceMode == RecentsDataSourceModeRooms)
|
|
{
|
|
return NO;
|
|
}
|
|
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:path.section];
|
|
return (path && ((sectionType == RecentsDataSourceSectionTypeFavorites)
|
|
|| (sectionType == RecentsDataSourceSectionTypePeople)
|
|
|| (sectionType == RecentsDataSourceSectionTypeLowPriority)
|
|
|| (sectionType == RecentsDataSourceSectionTypeServerNotice)
|
|
|| (sectionType == RecentsDataSourceSectionTypeConversation)));
|
|
}
|
|
|
|
- (BOOL)canCellMoveFrom:(NSIndexPath*)oldPath to:(NSIndexPath*)newPath
|
|
{
|
|
BOOL res = [self isDraggableCellAt:oldPath] && [self isDraggableCellAt:newPath];
|
|
|
|
// the both index pathes are movable
|
|
if (res)
|
|
{
|
|
// only the favorites cell can be moved within the same section
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:oldPath.section];
|
|
res &= (sectionType == RecentsDataSourceSectionTypeFavorites) || (newPath.section != oldPath.section);
|
|
|
|
// other cases ?
|
|
}
|
|
|
|
return res;
|
|
}
|
|
|
|
- (NSString*)roomTagAt:(NSIndexPath*)path
|
|
{
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:path.section];
|
|
if (sectionType == RecentsDataSourceSectionTypeFavorites)
|
|
{
|
|
return kMXRoomTagFavourite;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeLowPriority)
|
|
{
|
|
return kMXRoomTagLowPriority;
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeServerNotice)
|
|
{
|
|
return kMXRoomTagServerNotice;
|
|
}
|
|
|
|
return nil;
|
|
}
|
|
|
|
- (void)paginateInSection:(NSInteger)section
|
|
{
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:section];
|
|
if (sectionType == RecentsDataSourceSectionTypeInvites)
|
|
{
|
|
[self.recentsListService paginateInSection:RecentsListServiceSectionInvited];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeFavorites)
|
|
{
|
|
[self.recentsListService paginateInSection:RecentsListServiceSectionFavorited];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypePeople)
|
|
{
|
|
[self.recentsListService paginateInSection:RecentsListServiceSectionPeople];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeConversation)
|
|
{
|
|
[self.recentsListService paginateInSection:RecentsListServiceSectionConversation];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeLowPriority)
|
|
{
|
|
[self.recentsListService paginateInSection:RecentsListServiceSectionLowPriority];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeServerNotice)
|
|
{
|
|
[self.recentsListService paginateInSection:RecentsListServiceSectionServerNotice];
|
|
}
|
|
else if (sectionType == RecentsDataSourceSectionTypeSuggestedRooms)
|
|
{
|
|
[self.recentsListService paginateInSection:RecentsListServiceSectionSuggested];
|
|
}
|
|
}
|
|
|
|
- (void)moveRoomCell:(MXRoom*)room from:(NSIndexPath*)oldPath to:(NSIndexPath*)newPath success:(void (^)(void))moveSuccess failure:(void (^)(NSError *error))moveFailure;
|
|
{
|
|
MXLogDebug(@"[RecentsDataSource] moveCellFrom (%tu, %tu) to (%tu, %tu)", oldPath.section, oldPath.row, newPath.section, newPath.row);
|
|
|
|
if ([self canCellMoveFrom:oldPath to:newPath] && ![newPath isEqual:oldPath])
|
|
{
|
|
if ([self.sections sectionTypeForSectionIndex:newPath.section] == RecentsDataSourceSectionTypePeople)
|
|
{
|
|
[room setIsDirect:YES
|
|
withUserId:nil
|
|
success:moveSuccess
|
|
failure:^(NSError *error) {
|
|
|
|
MXLogDebug(@"[RecentsDataSource] Failed to mark as direct");
|
|
|
|
if (moveFailure)
|
|
{
|
|
moveFailure(error);
|
|
}
|
|
|
|
[self forceRefresh];
|
|
|
|
// Notify user
|
|
[[AppDelegate theDelegate] showErrorAsAlert:error];
|
|
}];
|
|
}
|
|
else
|
|
{
|
|
NSString* oldRoomTag = [self roomTagAt:oldPath];
|
|
NSString* dstRoomTag = [self roomTagAt:newPath];
|
|
NSUInteger oldPos = (oldPath.section == newPath.section) ? oldPath.row : NSNotFound;
|
|
|
|
NSString* tagOrder = [room.mxSession tagOrderToBeAtIndex:newPath.row from:oldPos withTag:dstRoomTag];
|
|
|
|
MXLogDebug(@"[RecentsDataSource] Update the room %@ [%@] tag from %@ to %@ with tag order %@", room.roomId, room.summary.displayname, oldRoomTag, dstRoomTag, tagOrder);
|
|
|
|
[room replaceTag:oldRoomTag
|
|
byTag:dstRoomTag
|
|
withOrder:tagOrder
|
|
success: ^{
|
|
|
|
MXLogDebug(@"[RecentsDataSource] move is done");
|
|
|
|
if (moveSuccess)
|
|
{
|
|
moveSuccess();
|
|
}
|
|
|
|
// wait the server echo to reload the tableview.
|
|
|
|
} failure:^(NSError *error) {
|
|
|
|
MXLogDebug(@"[RecentsDataSource] Failed to update the tag %@ of room (%@)", dstRoomTag, room.roomId);
|
|
|
|
if (moveFailure)
|
|
{
|
|
moveFailure(error);
|
|
}
|
|
|
|
[self forceRefresh];
|
|
|
|
// Notify user
|
|
[[AppDelegate theDelegate] showErrorAsAlert:error];
|
|
}];
|
|
}
|
|
}
|
|
else
|
|
{
|
|
MXLogDebug(@"[RecentsDataSource] cannot move this cell");
|
|
|
|
if (moveFailure)
|
|
{
|
|
moveFailure(nil);
|
|
}
|
|
|
|
[self forceRefresh];
|
|
}
|
|
}
|
|
|
|
#pragma mark - SecureBackupSetupBannerCellDelegate
|
|
|
|
- (void)secureBackupBannerCellDidTapCloseAction:(SecureBackupBannerCell * _Nonnull)cell
|
|
{
|
|
[self hideKeyBackupBannerWithDisplay:self.secureBackupBannerDisplay];
|
|
}
|
|
|
|
#pragma mark - CrossSigningSetupBannerCellDelegate
|
|
|
|
- (void)crossSigningSetupBannerCellDidTapCloseAction:(CrossSigningSetupBannerCell *)cell
|
|
{
|
|
[self hideCrossSigningBannerWithDisplay:self.crossSigningBannerDisplay];
|
|
}
|
|
|
|
#pragma mark - RecentsListServiceDelegate
|
|
|
|
- (void)recentsListServiceDidChangeData:(id<RecentsListServiceProtocol>)service
|
|
totalCountsChanged:(BOOL)totalCountsChanged
|
|
{
|
|
[[AppDelegate theDelegate].masterTabBarController refreshTabBarBadges];
|
|
}
|
|
|
|
- (void)recentsListServiceDidChangeData:(id<RecentsListServiceProtocol>)service
|
|
forSection:(RecentsListServiceSection)section
|
|
totalCountsChanged:(BOOL)totalCountsChanged
|
|
{
|
|
RecentsDataSourceSections *updatedSections = [self makeDataSourceSections];
|
|
BOOL hasChangedSections = ![self.sections isEqual:updatedSections];
|
|
if (hasChangedSections)
|
|
{
|
|
// If the number or order of sections has changed, we reload all of the data
|
|
[self.delegate dataSource:self didCellChange:nil];
|
|
return;
|
|
}
|
|
|
|
RecentsDataSourceSectionType sectionType = [self sectionTypeForServiceSection:section];
|
|
NSInteger sectionIndex = [self.sections sectionIndexForSectionType:sectionType];
|
|
if (sectionIndex >= 0)
|
|
{
|
|
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:(NSUInteger)sectionIndex];
|
|
[self.delegate dataSource:self didCellChange:indexPath];
|
|
}
|
|
}
|
|
|
|
- (RecentsDataSourceSectionType)sectionTypeForServiceSection:(RecentsListServiceSection)serviceSection
|
|
{
|
|
switch (serviceSection)
|
|
{
|
|
case RecentsListServiceSectionInvited:
|
|
return RecentsDataSourceSectionTypeInvites;
|
|
case RecentsListServiceSectionFavorited:
|
|
return RecentsDataSourceSectionTypeFavorites;
|
|
case RecentsListServiceSectionPeople:
|
|
return RecentsDataSourceSectionTypePeople;
|
|
case RecentsListServiceSectionConversation:
|
|
return RecentsDataSourceSectionTypeConversation;
|
|
case RecentsListServiceSectionLowPriority:
|
|
return RecentsDataSourceSectionTypeLowPriority;
|
|
case RecentsListServiceSectionServerNotice:
|
|
return RecentsDataSourceSectionTypeServerNotice;
|
|
case RecentsListServiceSectionSuggested:
|
|
return RecentsDataSourceSectionTypeSuggestedRooms;
|
|
}
|
|
}
|
|
|
|
#pragma mark - Shrinkable
|
|
- (BOOL)isSectionShrinkedAt:(NSInteger)section
|
|
{
|
|
if (_areSectionsShrinkable == NO)
|
|
{
|
|
return NO;
|
|
}
|
|
|
|
RecentsDataSourceSectionType sectionType = [self.sections sectionTypeForSectionIndex:section];
|
|
if (sectionType == RecentsDataSourceSectionTypeFavorites && (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_FAVORITES))
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
if (sectionType == RecentsDataSourceSectionTypePeople && (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_PEOPLE))
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
if (sectionType == RecentsDataSourceSectionTypeConversation && (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_CONVERSATIONS))
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
if (sectionType == RecentsDataSourceSectionTypeDirectory && (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_DIRECTORY))
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
if (sectionType == RecentsDataSourceSectionTypeLowPriority && (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_LOWPRIORITY))
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
if (sectionType == RecentsDataSourceSectionTypeServerNotice && (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_SERVERNOTICE))
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
if (sectionType == RecentsDataSourceSectionTypeInvites && (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_INVITES))
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
if (sectionType == RecentsDataSourceSectionTypeSuggestedRooms && (shrinkedSectionsBitMask & RECENTSDATASOURCE_SECTION_SUGGESTED))
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
return NO;
|
|
}
|
|
|
|
@end
|