Renaming
This commit is contained in:
parent
649a146e8f
commit
c3ca23d736
|
@ -5,7 +5,7 @@ import UIKit
|
|||
|
||||
final class AppDelegate: NSObject {
|
||||
@Published private var application: UIApplication?
|
||||
private let remoteNotificationDeviceTokens = PassthroughSubject<Data, Error>()
|
||||
private let deviceTokenSubject = PassthroughSubject<Data, Error>()
|
||||
}
|
||||
|
||||
extension AppDelegate {
|
||||
|
@ -14,7 +14,7 @@ extension AppDelegate {
|
|||
.compactMap { $0 }
|
||||
.handleEvents(receiveOutput: { $0.registerForRemoteNotifications() })
|
||||
.setFailureType(to: Error.self)
|
||||
.zip(remoteNotificationDeviceTokens)
|
||||
.zip(deviceTokenSubject)
|
||||
.first()
|
||||
.map { $1 }
|
||||
.eraseToAnyPublisher()
|
||||
|
@ -32,11 +32,11 @@ extension AppDelegate: UIApplicationDelegate {
|
|||
|
||||
func application(_ application: UIApplication,
|
||||
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
|
||||
remoteNotificationDeviceTokens.send(deviceToken)
|
||||
deviceTokenSubject.send(deviceToken)
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication,
|
||||
didFailToRegisterForRemoteNotificationsWithError error: Error) {
|
||||
remoteNotificationDeviceTokens.send(completion: .failure(error))
|
||||
deviceTokenSubject.send(completion: .failure(error))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,14 +16,14 @@ public final class EditFilterViewModel: ObservableObject {
|
|||
}
|
||||
|
||||
private let identification: Identification
|
||||
private let saveCompletedInput = PassthroughSubject<Void, Never>()
|
||||
private let saveCompletedSubject = PassthroughSubject<Void, Never>()
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
|
||||
public init(filter: Filter, identification: Identification) {
|
||||
self.filter = filter
|
||||
self.identification = identification
|
||||
date = filter.expiresAt ?? Date()
|
||||
saveCompleted = saveCompletedInput.eraseToAnyPublisher()
|
||||
saveCompleted = saveCompletedSubject.eraseToAnyPublisher()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public extension EditFilterViewModel {
|
|||
self.saving = false
|
||||
|
||||
if case .finished = $0 {
|
||||
self.saveCompletedInput.send(())
|
||||
self.saveCompletedSubject.send()
|
||||
}
|
||||
})
|
||||
.sink { _ in }
|
||||
|
|
Loading…
Reference in New Issue