Hide save action after saving completed.

This commit is contained in:
onurays 2020-06-30 11:57:04 +03:00 committed by Benoit Marty
parent b3d4d20195
commit e0ea0c195b

View file

@ -66,7 +66,8 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState:
historyVisibilityEvent = room.getStateEvent(EventType.STATE_ROOM_HISTORY_VISIBILITY), historyVisibilityEvent = room.getStateEvent(EventType.STATE_ROOM_HISTORY_VISIBILITY),
roomSummary = async, roomSummary = async,
newName = roomSummary?.displayName, newName = roomSummary?.displayName,
newTopic = roomSummary?.topic newTopic = roomSummary?.topic,
newAlias = roomSummary?.canonicalAlias
) )
} }
@ -145,7 +146,7 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState:
{ {
postLoading(false) postLoading(false)
setState { copy(newHistoryVisibility = null) } setState { copy(newHistoryVisibility = null) }
setState { copy(showSaveAction = shouldShowSaveAction(this)) } setState { copy(showSaveAction = false) }
_viewEvents.post(RoomSettingsViewEvents.Success) _viewEvents.post(RoomSettingsViewEvents.Success)
}, },
{ {