Files
element-x-ios/ElementX/Sources/AppHooks/AppHooks.swift
T
Doug ac29354b08 Move any visible account settings into AccountSettings. (#6308)
* Remove the now unused setting to disable in-app notifications.

* Move visible account settings into AccountSettings.

Have ignored enableNotifications for now as that will require reworking the NotificationManager.

* Allow different sounds to be selected for each account.

* Move defaultNotificationTone into AccountSettings.
2026-10-13 15:21:13 +01:00

78 lines
2.5 KiB
Swift

//
// Copyright 2025 Element Creations Ltd.
// Copyright 2024-2025 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.
//
import Foundation
import Macros
import Synchronization
final nonisolated class AppHooks: AppHooksProtocol {
#if IS_MAIN_APP
func configure(with userSession: UserSessionProtocol?) async {
await userSessionHook.configure(with: userSession)
}
@AppHook(default: DefaultAppSettingsHook())
var appSettingsHook: AppSettingsHookProtocol
@AppHook(default: DefaultCompoundHook())
var compoundHook: CompoundHookProtocol
@AppHook(default: DefaultBugReportHook())
var bugReportHook: BugReportHookProtocol
@AppHook(default: DefaultOAuthPresenterHook())
var oAuthPresenterHook: OAuthPresenterHookProtocol
@AppHook(default: DefaultRoomScreenHook())
var roomScreenHook: RoomScreenHookProtocol
@AppHook(default: DefaultRoomDetailsScreenHook())
var roomDetailsScreenHook: RoomDetailsScreenHookProtocol
@AppHook(default: DefaultRoomMemberDetailsScreenHook())
var roomMemberDetailsScreenHook: RoomMemberDetailsScreenHookProtocol
@AppHook(default: DefaultUserProfileScreenHook())
var userProfileScreenHook: UserProfileScreenHookProtocol
@AppHook(default: DefaultDeveloperOptionsScreenHook())
var developerOptionsScreenHook: DeveloperOptionsScreenHookProtocol
@AppHook(default: DefaultRecoveryKeyScreenHook())
var recoveryKeyScreenHook: RecoveryKeyScreenHookProtocol
@AppHook(default: DefaultCreateRoomScreenHook())
var createRoomScreenHook: CreateRoomScreenHookProtocol
@AppHook(default: DefaultSecurityAndPrivacyScreenHook())
var securityAndPrivacyScreenHook: SecurityAndPrivacyScreenHookProtocol
#endif
@AppHook(default: DefaultTracingHook())
var tracingHook: TracingHookProtocol
@AppHook(default: DefaultClientFactoryHook())
var clientFactoryHook: ClientFactoryHookProtocol
@AppHook(default: DefaultRemoteSettingsHook())
var remoteSettingsHook: RemoteSettingsHookProtocol
@AppHook(default: DefaultUserSessionHook())
var userSessionHook: UserSessionHookProtocol
}
nonisolated protocol AppHooksProtocol: Sendable {
// periphery:ignore - required for the architecture
func setUp()
}
nonisolated extension AppHooksProtocol {
// periphery:ignore - required for the architecture
func setUp() { }
}