File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
presentation/src/main/java/com/stop/ui/route Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -92,13 +92,13 @@ class RouteViewModel @Inject constructor(
92
92
viewModelScope.launch(Dispatchers .Default + coroutineExceptionHandler) {
93
93
val itineraries = getRouteUseCase(routeRequest)
94
94
if (itineraries.isEmpty()) {
95
- _errorMessage .value = Event (ErrorType .NO_ROUTE_RESULT )
96
- _routeResponse .value = listOf ()
97
- _isLoading .value = Event (false )
95
+ _errorMessage .postValue( Event (ErrorType .NO_ROUTE_RESULT ) )
96
+ _routeResponse .postValue( listOf () )
97
+ _isLoading .postValue( Event (false ) )
98
98
return @launch
99
99
}
100
- this @RouteViewModel._routeResponse .value = itineraries
101
- _isLoading .value = Event (false )
100
+ this @RouteViewModel._routeResponse .postValue( itineraries)
101
+ _isLoading .postValue( Event (false ) )
102
102
}
103
103
}
104
104
@@ -112,8 +112,7 @@ class RouteViewModel @Inject constructor(
112
112
fun calculateLastTransportTime (itinerary : Itinerary ) {
113
113
checkClickedItinerary(itinerary)
114
114
viewModelScope.launch(Dispatchers .Default + coroutineExceptionHandler) {
115
- this @RouteViewModel._lastTimeResponse .value =
116
- Event (getLastTransportTimeUseCase(itinerary))
115
+ this @RouteViewModel._lastTimeResponse .postValue(Event (getLastTransportTimeUseCase(itinerary)))
117
116
}
118
117
}
119
118
You can’t perform that action at this time.
0 commit comments