Merge pull request #1828 from vector-im/feature/improve_edit_role_button

Improve UI of edit role button
This commit is contained in:
Valere 2020-07-28 14:46:54 +02:00 committed by GitHub
commit de32cdb703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 12 deletions

View File

@ -7,6 +7,7 @@ Features ✨:
Improvements 🙌: Improvements 🙌:
- Sending events is now retried only 3 times, so we avoid blocking the sending queue too long. - 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 - Display warning when fail to send events in room list
- Improve UI of edit role action in member profile
Bugfix 🐛: Bugfix 🐛:
- Fix theme issue on Room directory screen (#1613) - Fix theme issue on Room directory screen (#1613)

View File

@ -236,10 +236,12 @@ class RoomMemberProfileController @Inject constructor(
if (canEditPowerLevel) { if (canEditPowerLevel) {
buildProfileAction( buildProfileAction(
id = "edit_power_level", id = "edit_power_level",
editable = false, editable = true,
title = powerLevelsStr, title = stringProvider.getString(R.string.power_level_title),
subtitle = powerLevelsStr,
divider = canKick || canBan, divider = canKick || canBan,
dividerColor = dividerColor, dividerColor = dividerColor,
editableRes = R.drawable.ic_edit,
action = { callback?.onEditPowerLevel(userPowerLevel) } action = { callback?.onEditPowerLevel(userPowerLevel) }
) )
} }

View File

@ -1,22 +1,20 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="21dp" android:width="24dp"
android:height="22dp" android:height="24dp"
android:viewportWidth="21" android:viewportWidth="24"
android:viewportHeight="22"> android:viewportHeight="24">
<path <path
android:pathData="M9.4969,3.0606L2.8882,3.0606C1.8454,3.0606 1,3.9289 1,5L1,18.5758C1,19.6469 1.8454,20.5152 2.8882,20.5152L16.1056,20.5152C17.1484,20.5152 17.9938,19.6469 17.9938,18.5758L17.9938,11.7879" android:pathData="M4,18.6666L20,18.6666"
android:strokeLineJoin="round" android:strokeLineJoin="round"
android:strokeWidth="2" android:strokeWidth="2"
android:fillColor="#00000000" android:fillColor="#00000000"
android:strokeColor="#9E9E9E" android:strokeColor="#000000"
android:fillType="evenOdd"
android:strokeLineCap="round"/> android:strokeLineCap="round"/>
<path <path
android:pathData="M16.5776,1.6061C17.3598,0.8027 18.6278,0.8027 19.4099,1.6061C20.1921,2.4094 20.1921,3.7118 19.4099,4.5152L10.441,13.7273L6.6646,14.697L7.6087,10.8182L16.5776,1.6061Z" android:pathData="M6.6667,14L16.0001,4.6666"
android:strokeLineJoin="round" android:strokeLineJoin="round"
android:strokeWidth="2" android:strokeWidth="2"
android:fillColor="#00000000" android:fillColor="#00000000"
android:strokeColor="#9E9E9E" android:strokeColor="#000000"
android:fillType="evenOdd"
android:strokeLineCap="round"/> android:strokeLineCap="round"/>
</vector> </vector>

View File

@ -2499,6 +2499,7 @@ Not all features in Riot are implemented in Element yet. Main missing (and comin
<string name="identity_server_set_alternative_notice_no_default">Enter the URL of an identity server</string> <string name="identity_server_set_alternative_notice_no_default">Enter the URL of an identity server</string>
<string name="identity_server_set_alternative_submit">Submit</string> <string name="identity_server_set_alternative_submit">Submit</string>
<string name="power_level_edit_title">Set role</string> <string name="power_level_edit_title">Set role</string>
<string name="power_level_title">Role</string>
<string name="a11y_open_chat">Open chat</string> <string name="a11y_open_chat">Open chat</string>
<string name="a11y_mute_microphone">Mute the microphone</string> <string name="a11y_mute_microphone">Mute the microphone</string>
<string name="a11y_unmute_microphone">Unmute the microphone</string> <string name="a11y_unmute_microphone">Unmute the microphone</string>