mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
Remove the CommonSettingsProtocol and use UserSession to carry multiple dependencies. (#6302)
* Remove the CommonSettingsProtocol. * Replace multiple dependencies with the UserSession when it carries them.
This commit is contained in:
@@ -799,7 +799,6 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
emojiProvider: EmojiProvider(userSettings: userSession.userSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
appMediator: appMediator,
|
||||
userSettings: userSession.userSettings, // TODO: @pixlwave Remove this in favour of the userSession.
|
||||
appHooks: appHooks,
|
||||
analytics: analyticsService,
|
||||
userIndicatorController: userIndicatorController,
|
||||
|
||||
@@ -31,7 +31,6 @@ struct CommonFlowParameters {
|
||||
let emojiProvider: EmojiProviderProtocol
|
||||
let linkMetadataProvider: LinkMetadataProviderProtocol
|
||||
let appMediator: AppMediatorProtocol
|
||||
let userSettings: UserSettings
|
||||
let appHooks: AppHooks
|
||||
let analytics: AnalyticsServiceProtocol
|
||||
let userIndicatorController: UserIndicatorControllerProtocol
|
||||
|
||||
@@ -15,24 +15,6 @@ import Foundation
|
||||
import Macros
|
||||
import SwiftUI
|
||||
|
||||
/// Common settings between app and NSE
|
||||
nonisolated protocol CommonSettingsProtocol: AnyObject, Sendable {
|
||||
var lastNotificationBootTime: TimeInterval? { get set }
|
||||
var selectedNotificationTone: NotificationTone? { get set }
|
||||
var lastKnownBadgeCount: Int { get set }
|
||||
|
||||
var logLevel: LogLevel { get }
|
||||
var traceLogPacks: Set<TraceLogPack> { get }
|
||||
var bugReportRageshakeURL: RemotePreference<RageshakeConfiguration> { get }
|
||||
var contentScannerURL: RemotePreference<URL?> { get }
|
||||
var forceDisableE2EE: RemotePreference<Bool> { get }
|
||||
var mapTilerConfiguration: RemotePreference<MapTilerConfiguration> { get }
|
||||
|
||||
var enableOnlySignedDeviceIsolationMode: Bool { get }
|
||||
var threadsEnabled: Bool { get }
|
||||
var hideQuietNotificationAlerts: Bool { get }
|
||||
}
|
||||
|
||||
nonisolated enum AppBuildType {
|
||||
case debug
|
||||
case nightly
|
||||
@@ -475,5 +457,3 @@ final nonisolated class AppSettings: @unchecked Sendable {
|
||||
AppSettings(store: VolatileUserDefaults())
|
||||
}
|
||||
}
|
||||
|
||||
nonisolated extension AppSettings: CommonSettingsProtocol { }
|
||||
|
||||
Reference in New Issue
Block a user