mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-01 19:41:27 +00:00
16 lines
451 B
Swift
16 lines
451 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
class PreferencesViewModel: ObservableObject {
|
|
@Published var preferences: Identity.Preferences
|
|
|
|
private let environment: IdentifiedEnvironment
|
|
|
|
init(environment: IdentifiedEnvironment) {
|
|
self.environment = environment
|
|
preferences = environment.identity.preferences
|
|
environment.$identity.map(\.preferences).assign(to: &$preferences)
|
|
}
|
|
}
|