mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
fc75f90ef5
* Remove the dynamic member lookup from UserSettings in favour of nested access. * Remove forwarding methods from UserSettings. * Update the Enterprise submodule.
26 lines
745 B
Swift
26 lines
745 B
Swift
//
|
|
// Copyright 2026 Element Creations 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
|
|
|
|
/// The settings for a signed in account, composed of the app wide settings and the settings
|
|
/// specific to that account.
|
|
final nonisolated class UserSettings: Sendable {
|
|
let app: AppSettings
|
|
let account: AccountSettings
|
|
|
|
init(appSettings: AppSettings, accountSettings: AccountSettings) {
|
|
app = appSettings
|
|
account = accountSettings
|
|
}
|
|
|
|
static func mock(userID: String = "@me:matrix.org") -> UserSettings {
|
|
AppSettings.volatile().userSettings(for: userID)
|
|
}
|
|
}
|