refactor: trim message history orchestration
This commit is contained in:
@@ -69,9 +69,22 @@ class ProfileViewModelImpl(
|
||||
nomCase = null
|
||||
).listenValue(viewModelScope) { state ->
|
||||
state.processState(
|
||||
error = { error ->
|
||||
// TODO: 12/07/2024, Danil Nikolaev: if local info is null then show error view
|
||||
},
|
||||
error = { error ->
|
||||
VkUtils.parseError(error)?.let { newBaseError ->
|
||||
baseError.setValue { newBaseError }
|
||||
}
|
||||
|
||||
if (baseError.value == null) {
|
||||
baseError.setValue { BaseError.InternalError }
|
||||
}
|
||||
|
||||
screenState.setValue { old ->
|
||||
old.copy(
|
||||
avatarUrl = null,
|
||||
fullName = null
|
||||
)
|
||||
}
|
||||
},
|
||||
success = { response ->
|
||||
val user = requireNotNull(response)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user