metatext/Shared/View Models/PreferencesViewModel.swift

21 lines
549 B
Swift
Raw Normal View History

2020-08-07 10:59:48 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
class PreferencesViewModel: ObservableObject {
let handle: String
2020-08-08 23:08:47 +00:00
private let identityService: IdentityService
2020-08-07 10:59:48 +00:00
2020-08-08 23:08:47 +00:00
init(identityService: IdentityService) {
self.identityService = identityService
handle = identityService.identity.handle
2020-08-07 10:59:48 +00:00
}
}
extension PreferencesViewModel {
func postingReadingPreferencesViewModel() -> PostingReadingPreferencesViewModel {
2020-08-08 23:08:47 +00:00
PostingReadingPreferencesViewModel(identityService: identityService)
2020-08-07 10:59:48 +00:00
}
}