mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 11:48:51 +03:00
Optimize call flow
This commit is contained in:
parent
96d5652fcd
commit
51c9c2f032
1 changed files with 2 additions and 5 deletions
|
@ -132,14 +132,11 @@ class RoomMemberProfileViewModel @AssistedInject constructor(
|
|||
session.flow()
|
||||
.liveUserAccountData(UserAccountDataTypes.TYPE_OVERRIDE_COLORS)
|
||||
.unwrap()
|
||||
.map { it.content.toModel<Map<String, String>>() }
|
||||
.map { userColorAccountDataContent ->
|
||||
userColorAccountDataContent?.get(initialState.userId)
|
||||
}
|
||||
.onEach {
|
||||
val newUserColor = it.content.toModel<Map<String, String>>()?.get(initialState.userId)
|
||||
setState {
|
||||
copy(
|
||||
userColorOverride = it
|
||||
userColorOverride = newUserColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue