Fix discard change dialog displayed by mistake when avatar has been updated

This commit is contained in:
Benoit Marty 2020-11-09 23:00:19 +01:00
parent 0753ba3495
commit cedeea13e6
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,8 @@ Improvements 🙌:
- Open an existing DM instead of creating a new one (#2319) - Open an existing DM instead of creating a new one (#2319)
Bugfix 🐛: Bugfix 🐛:
- Fix issue when updating the avatar of a room - Fix issue when updating the avatar of a room (new avatar vanishing)
- Discard change dialog displayed by mistake when avatar has been updated
Translations 🗣: Translations 🗣:
- -

View File

@ -211,7 +211,10 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState:
postLoading(false) postLoading(false)
setState { setState {
deletePendingAvatar(this) deletePendingAvatar(this)
copy(newHistoryVisibility = null) copy(
avatarAction = RoomSettingsViewState.AvatarAction.None,
newHistoryVisibility = null
)
} }
_viewEvents.post(RoomSettingsViewEvents.Success) _viewEvents.post(RoomSettingsViewEvents.Success)
}, },