Skip to content

Commit

Permalink
Updated copy and moved override in profile screen
Browse files Browse the repository at this point in the history
- Used display name instead of nick to match other strings in the app.
- Reordered member profile to show DM above changing nick colour.

Fixes #5825

Signed-off-by: Henry Jackson <[email protected]>
  • Loading branch information
Henry Jackson authored and ouchadam committed May 12, 2022
1 parent f8b9858 commit 5c27e51
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions changelog.d/5825.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changed copy and list order in member profile screen.
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,19 @@ class RoomMemberProfileController @Inject constructor(
// More
buildProfileSection(stringProvider.getString(R.string.room_profile_section_more))

if (!state.isMine) {
buildProfileAction(
id = "direct",
editable = false,
title = stringProvider.getString(R.string.room_member_open_or_create_dm),
action = { callback?.onOpenDmClicked() }
)
}

buildProfileAction(
id = "overrideColor",
editable = false,
title = stringProvider.getString(R.string.room_member_override_nick_color),
title = stringProvider.getString(R.string.room_member_override_display_name_colour),
subtitle = state.userColorOverride,
divider = !state.isMine,
action = { callback?.onOverrideColorClicked() }
Expand All @@ -194,13 +203,6 @@ class RoomMemberProfileController @Inject constructor(
if (!state.isMine) {
val membership = state.asyncMembership() ?: return

buildProfileAction(
id = "direct",
editable = false,
title = stringProvider.getString(R.string.room_member_open_or_create_dm),
action = { callback?.onOpenDmClicked() }
)

if (!state.isSpace && state.hasReadReceipt) {
buildProfileAction(
id = "read_receipt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ class RoomMemberProfileFragment @Inject constructor(
views.editText.hint = "#000000"

MaterialAlertDialogBuilder(requireContext())
.setTitle(R.string.room_member_override_nick_color)
.setTitle(R.string.room_member_override_display_name_colour)
.setView(layout)
.setPositiveButton(R.string.ok) { _, _ ->
val newColor = views.editText.text.toString()
Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@
<string name="direct_room_profile_section_more_leave">Leave</string>
<string name="room_profile_leaving_room">"Leaving the room…"</string>

<string name="room_member_override_nick_color">Override nick color</string>
<string name="room_member_override_display_name_colour">Override display name colour</string>

<string name="room_member_power_level_admins">Admins</string>
<string name="room_member_power_level_moderators">Moderators</string>
Expand Down

0 comments on commit 5c27e51

Please sign in to comment.