From e0ea0c195b120de2a753251fad421930b9dfb4d4 Mon Sep 17 00:00:00 2001 From: onurays Date: Tue, 30 Jun 2020 11:57:04 +0300 Subject: [PATCH] Hide save action after saving completed. --- .../features/roomprofile/settings/RoomSettingsViewModel.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/roomprofile/settings/RoomSettingsViewModel.kt b/vector/src/main/java/im/vector/riotx/features/roomprofile/settings/RoomSettingsViewModel.kt index 7e8363bf33..050bac5cf2 100644 --- a/vector/src/main/java/im/vector/riotx/features/roomprofile/settings/RoomSettingsViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/roomprofile/settings/RoomSettingsViewModel.kt @@ -66,7 +66,8 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState: historyVisibilityEvent = room.getStateEvent(EventType.STATE_ROOM_HISTORY_VISIBILITY), roomSummary = async, newName = roomSummary?.displayName, - newTopic = roomSummary?.topic + newTopic = roomSummary?.topic, + newAlias = roomSummary?.canonicalAlias ) } @@ -145,7 +146,7 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState: { postLoading(false) setState { copy(newHistoryVisibility = null) } - setState { copy(showSaveAction = shouldShowSaveAction(this)) } + setState { copy(showSaveAction = false) } _viewEvents.post(RoomSettingsViewEvents.Success) }, {