File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
BBus/BBus/Background/GetOnAlarm Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import UIKit
1010import Combine
1111import CoreLocation
1212
13- final class GetOnAlarmController : NSObject {
13+ final class GetOnAlarmController {
1414
1515 static private let alarmIdentifier : String = " GetOnAlarm "
1616
@@ -21,7 +21,7 @@ final class GetOnAlarmController: NSObject {
2121
2222 @Published private( set) var viewModel : GetOnAlarmViewModel ?
2323
24- private override init ( ) {
24+ private init ( ) {
2525 self . cancellables = [ ]
2626 }
2727
@@ -70,14 +70,14 @@ final class GetOnAlarmController: NSObject {
7070 }
7171
7272 private func bindMessage( ) {
73- self . viewModel? . $getApproachStatus
73+ self . viewModel? . $busApproachStatus
7474 . sink ( receiveValue: { [ weak self] status in
7575 guard let status = status,
7676 let message = self ? . viewModel? . message else { return }
7777 if status == . oneStationLeft {
7878 self ? . stop ( )
7979 }
80- self ? . pushGetOnAlarm ( title: " 승차 알람 " , message: message)
80+ self ? . pushGetOnAlarm ( title: " 승차 알람 " , message: message)
8181 } )
8282 . store ( in: & self . cancellables)
8383 }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ final class GetOnAlarmViewModel {
1313 let usecase : GetOnAlarmUsecase
1414 private( set) var getOnAlarmStatus : GetOnAlarmStatus
1515 private var cancellables : Set < AnyCancellable >
16- @Published private( set) var getApproachStatus : BusApproachStatus ?
16+ @Published private( set) var busApproachStatus : BusApproachStatus ?
1717 private( set) var message : String ?
1818 @Published private( set) var networkErrorMessage : ( title: String , body: String ) ?
1919
@@ -23,7 +23,7 @@ final class GetOnAlarmViewModel {
2323 self . message = nil
2424 self . networkErrorMessage = nil
2525 self . cancellables = [ ]
26- self . getApproachStatus = nil
26+ self . busApproachStatus = nil
2727 self . execute ( )
2828 self . configureObserver ( )
2929 }
@@ -51,7 +51,7 @@ final class GetOnAlarmViewModel {
5151 beforeOrd: self . getOnAlarmStatus. currentBusOrd ?? stationOrd,
5252 targetOrd: self . getOnAlarmStatus. targetOrd) {
5353 self . makeMessage ( with: status)
54- self . getApproachStatus = status
54+ self . busApproachStatus = status
5555 }
5656 self . getOnAlarmStatus = self . getOnAlarmStatus. withCurrentBusOrd ( stationOrd)
5757 }
You can’t perform that action at this time.
0 commit comments