This commit is contained in:
2026-02-04 09:11:41 +08:00
parent 39e73f3b29
commit fdefdf9eba
2 changed files with 4 additions and 1 deletions
@@ -13,6 +13,7 @@ import com.sw.inbound.network.LoadingState
import com.sw.inbound.objbox.FoodModule
import com.sw.inbound.repository.RemoteRepository
import com.sw.inbound.utils.ToastUtils
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
@@ -73,6 +74,7 @@ abstract class BaseViewModel(
// 错误处理可被子类重写
handleError(e)
} finally {
delay(500)
LoadingState.hide()
}
}