From 73c051d2b19286bfea525989c07b5244fc563484 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 28 Jul 2020 11:35:37 +0200 Subject: [PATCH] Improve UI of edit role button --- CHANGES.md | 1 + .../RoomMemberProfileController.kt | 6 ++++-- vector/src/main/res/drawable/ic_edit.xml | 18 ++++++++---------- vector/src/main/res/values/strings.xml | 1 + 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b1e85e239d..77e0970aa4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Features ✨: Improvements 🙌: - Sending events is now retried only 3 times, so we avoid blocking the sending queue too long. - Display warning when fail to send events in room list + - Improve UI of edit role action in member profile Bugfix 🐛: - Fix theme issue on Room directory screen (#1613) diff --git a/vector/src/main/java/im/vector/riotx/features/roommemberprofile/RoomMemberProfileController.kt b/vector/src/main/java/im/vector/riotx/features/roommemberprofile/RoomMemberProfileController.kt index 1ad72ad424..a12d496e45 100644 --- a/vector/src/main/java/im/vector/riotx/features/roommemberprofile/RoomMemberProfileController.kt +++ b/vector/src/main/java/im/vector/riotx/features/roommemberprofile/RoomMemberProfileController.kt @@ -236,10 +236,12 @@ class RoomMemberProfileController @Inject constructor( if (canEditPowerLevel) { buildProfileAction( id = "edit_power_level", - editable = false, - title = powerLevelsStr, + editable = true, + title = stringProvider.getString(R.string.power_level_title), + subtitle = powerLevelsStr, divider = canKick || canBan, dividerColor = dividerColor, + editableRes = R.drawable.ic_edit, action = { callback?.onEditPowerLevel(userPowerLevel) } ) } diff --git a/vector/src/main/res/drawable/ic_edit.xml b/vector/src/main/res/drawable/ic_edit.xml index 1ad914fc99..33214d4246 100644 --- a/vector/src/main/res/drawable/ic_edit.xml +++ b/vector/src/main/res/drawable/ic_edit.xml @@ -1,22 +1,20 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 876206d519..42120a45d1 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2499,6 +2499,7 @@ Not all features in Riot are implemented in Element yet. Main missing (and comin Enter the URL of an identity server Submit Set role + Role Open chat Mute the microphone Unmute the microphone