refactor: trim message history orchestration

This commit is contained in:
Codex
2026-05-18 20:46:18 +03:00
parent c18a7963bf
commit 514b8859c7
5 changed files with 40 additions and 22 deletions
@@ -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)