From c3ca23d736b9d1450c67342c0ad9d3a5b161f5d5 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Wed, 9 Sep 2020 20:04:45 -0700 Subject: [PATCH] Renaming --- System/AppDelegate.swift | 8 ++++---- ViewModels/Sources/ViewModels/EditFilterViewModel.swift | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/System/AppDelegate.swift b/System/AppDelegate.swift index 9198bb7..4332bcb 100644 --- a/System/AppDelegate.swift +++ b/System/AppDelegate.swift @@ -5,7 +5,7 @@ import UIKit final class AppDelegate: NSObject { @Published private var application: UIApplication? - private let remoteNotificationDeviceTokens = PassthroughSubject() + private let deviceTokenSubject = PassthroughSubject() } 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)) } } diff --git a/ViewModels/Sources/ViewModels/EditFilterViewModel.swift b/ViewModels/Sources/ViewModels/EditFilterViewModel.swift index cb5015d..37e7dd6 100644 --- a/ViewModels/Sources/ViewModels/EditFilterViewModel.swift +++ b/ViewModels/Sources/ViewModels/EditFilterViewModel.swift @@ -16,14 +16,14 @@ public final class EditFilterViewModel: ObservableObject { } private let identification: Identification - private let saveCompletedInput = PassthroughSubject() + private let saveCompletedSubject = PassthroughSubject() private var cancellables = Set() 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 }