некорректное отображение данных в корзине

This commit is contained in:
dasha 2023-12-20 16:26:51 +04:00
parent a66218c7ab
commit 39f2cf609c

View File

@ -19,10 +19,12 @@ open class MyViewModel : ViewModel() {
fun runInScope(
actionSuccess: suspend () -> Unit,
actionError: suspend () -> Unit
actionError: suspend () -> Unit,
needLoadingScreen: Boolean = true,
) {
viewModelScope.launch {
apiStatus = ApiStatus.LOADING
if (needLoadingScreen)
apiStatus = ApiStatus.LOADING
runCatching {
actionSuccess()
apiStatus = ApiStatus.DONE