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