mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Replace the UserPreference property wrapper with the new macro version.
This commit is contained in:
@@ -55,7 +55,7 @@ class AppLockService: AppLockServiceProtocol {
|
||||
}
|
||||
|
||||
var numberOfPINAttempts: AnyPublisher<Int, Never> {
|
||||
appSettings.$appLockNumberOfPINAttempts
|
||||
appSettings.appLockNumberOfPINAttemptsPublisher
|
||||
}
|
||||
|
||||
init(keychainController: KeychainControllerProtocol, appSettings: AppSettings, context: LAContext = .init()) {
|
||||
|
||||
@@ -183,7 +183,7 @@ class LiveLocationManager: NSObject, LiveLocationManagerProtocol, CLLocationMana
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$liveLocationSharingSessionsByRoomID
|
||||
appSettings.liveLocationSharingSessionsByRoomIDPublisher
|
||||
.removeDuplicates()
|
||||
.sink { [weak self] sessions in
|
||||
guard let self else { return }
|
||||
@@ -197,7 +197,7 @@ class LiveLocationManager: NSObject, LiveLocationManagerProtocol, CLLocationMana
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$liveLocationMinimumDistanceUpdate
|
||||
appSettings.liveLocationMinimumDistanceUpdatePublisher
|
||||
.removeDuplicates()
|
||||
.debounce(for: .seconds(1), scheduler: DispatchQueue.main)
|
||||
.sink { [weak self] newValue in
|
||||
|
||||
@@ -51,7 +51,7 @@ final class NotificationManager: NSObject, NotificationManagerProtocol {
|
||||
MXLog.info("App setting 'enableNotifications' is '\(notificationsEnabled)'")
|
||||
|
||||
// Listen for changes to AppSettings.enableNotifications
|
||||
appSettings.$enableNotifications
|
||||
appSettings.enableNotificationsPublisher
|
||||
.sink { [weak self] newValue in
|
||||
self?.enableNotifications(newValue)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user