|
@@ -39,9 +39,9 @@ abstract class BaseViewModel : ViewModel() {
|
|
|
loadingStateFlow.value = StatusViewType.LOADING
|
|
|
}
|
|
|
}.onCompletion {
|
|
|
- // if (showLoading) {
|
|
|
- loadingStateFlow.value = StatusViewType.DISMISS
|
|
|
- // }
|
|
|
+ if (showLoading) {
|
|
|
+ loadingStateFlow.value = StatusViewType.DISMISS
|
|
|
+ }
|
|
|
}.flowOn(Dispatchers.IO).catch { e ->
|
|
|
apiException(e).toast()
|
|
|
loadingStateFlow.value = StatusViewType.ERROR
|