File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
presentation/src/main/java/com/stop/ui/route Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import com.stop.model.ErrorType
12
12
import com.stop.model.Event
13
13
import com.stop.model.route.Place
14
14
import dagger.hilt.android.lifecycle.HiltViewModel
15
- import kotlinx.coroutines.Dispatchers
16
15
import kotlinx.coroutines.launch
17
16
import javax.inject.Inject
18
17
@@ -62,15 +61,15 @@ class RouteViewModel @Inject constructor(
62
61
endY = destinationValue.coordinate.latitude,
63
62
)
64
63
65
- viewModelScope.launch( Dispatchers . IO ) {
66
- this @RouteViewModel._routeResponse .postValue( getRouteUseCase(routeRequest) )
64
+ viewModelScope.launch {
65
+ this @RouteViewModel._routeResponse .value = getRouteUseCase(routeRequest)
67
66
}
68
67
}
69
68
70
69
fun calculateLastTransportTime (itinerary : Itinerary ) {
71
70
checkClickedItinerary(itinerary)
72
- viewModelScope.launch( Dispatchers . IO ) {
73
- this @RouteViewModel._lastTimeResponse .postValue( getLastTransportTimeUseCase(itinerary) )
71
+ viewModelScope.launch {
72
+ this @RouteViewModel._lastTimeResponse .value = getLastTransportTimeUseCase(itinerary)
74
73
}
75
74
}
76
75
You can’t perform that action at this time.
0 commit comments