From 471f37490dae924169c551674ca389eec3515931 Mon Sep 17 00:00:00 2001 From: JISU LEE Date: Thu, 25 Nov 2021 14:27:08 +0900 Subject: [PATCH 1/2] =?UTF-8?q?restyle:=20#279=20#249=20=EB=A6=AC=EB=B7=B0?= =?UTF-8?q?=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift | 6 +++--- .../GetOnAlarm/ViewModel/GetOnAlarmViewModel.swift | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift b/BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift index 12aacc8e..44f409ed 100644 --- a/BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift +++ b/BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift @@ -10,7 +10,7 @@ import UIKit import Combine import CoreLocation -final class GetOnAlarmController: NSObject { +final class GetOnAlarmController { static private let alarmIdentifier: String = "GetOnAlarm" @@ -21,7 +21,7 @@ final class GetOnAlarmController: NSObject { @Published private(set) var viewModel: GetOnAlarmViewModel? - private override init() { + private init() { self.cancellables = [] } @@ -70,7 +70,7 @@ final class GetOnAlarmController: NSObject { } private func bindMessage() { - self.viewModel?.$getApproachStatus + self.viewModel?.$busApproachStatus .sink(receiveValue: { [weak self] status in guard let status = status, let message = self?.viewModel?.message else { return } diff --git a/BBus/BBus/Background/GetOnAlarm/ViewModel/GetOnAlarmViewModel.swift b/BBus/BBus/Background/GetOnAlarm/ViewModel/GetOnAlarmViewModel.swift index 6b6c27bd..4400750d 100644 --- a/BBus/BBus/Background/GetOnAlarm/ViewModel/GetOnAlarmViewModel.swift +++ b/BBus/BBus/Background/GetOnAlarm/ViewModel/GetOnAlarmViewModel.swift @@ -13,7 +13,7 @@ final class GetOnAlarmViewModel { let usecase: GetOnAlarmUsecase private(set) var getOnAlarmStatus: GetOnAlarmStatus private var cancellables: Set - @Published private(set) var getApproachStatus: BusApproachStatus? + @Published private(set) var busApproachStatus: BusApproachStatus? private(set) var message: String? @Published private(set) var networkErrorMessage: (title: String, body: String)? @@ -23,7 +23,7 @@ final class GetOnAlarmViewModel { self.message = nil self.networkErrorMessage = nil self.cancellables = [] - self.getApproachStatus = nil + self.busApproachStatus = nil self.execute() self.configureObserver() } @@ -51,7 +51,7 @@ final class GetOnAlarmViewModel { beforeOrd: self.getOnAlarmStatus.currentBusOrd ?? stationOrd, targetOrd: self.getOnAlarmStatus.targetOrd) { self.makeMessage(with: status) - self.getApproachStatus = status + self.busApproachStatus = status } self.getOnAlarmStatus = self.getOnAlarmStatus.withCurrentBusOrd(stationOrd) } From fdba7a158c2ad7ceccc3afa4b69f1d0a2b31ca97 Mon Sep 17 00:00:00 2001 From: JISU LEE Date: Thu, 25 Nov 2021 14:34:17 +0900 Subject: [PATCH 2/2] =?UTF-8?q?restyle:=20#279=20#269=20=EB=A6=AC=EB=B7=B0?= =?UTF-8?q?=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift b/BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift index 44f409ed..94a8544d 100644 --- a/BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift +++ b/BBus/BBus/Background/GetOnAlarm/GetOnAlarmController.swift @@ -77,7 +77,7 @@ final class GetOnAlarmController { if status == .oneStationLeft { self?.stop() } - self?.pushGetOnAlarm(title: "승차 알람" ,message: message) + self?.pushGetOnAlarm(title: "승차 알람", message: message) }) .store(in: &self.cancellables) }