From 7aaebd493be4c2f3996214089910da0210a4a723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Radics?= Date: Sun, 3 Jan 2021 18:47:53 +0100 Subject: [PATCH 1/6] [issue-2610] implement setting to override nick color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - allow changing the nick color by clicking the dispay-name in the room member detail page. - the ovirride-color can be specified as a hex string (#rrggbb) or as palette index (2) - entering an invalid color code or leaving the field blank reverts to the default hash-based nick color - the setting is stored in `account_data` as `im.vector.setting.override_colors` - future improvements / notes: - replace the text-based color entry with a proper color picker dialog - make the feature more discoverable - the color change listener is now in AppStateHandler, not sure if this is the best place - implement override color support in element-web / element-desktop, too Signed-off-by: Péter Radics --- CHANGES.md | 1 + .../accountdata/UserAccountDataTypes.kt | 1 + .../java/im/vector/app/AppStateHandler.kt | 22 +++++++++- .../helper/MatrixItemColorProvider.kt | 40 ++++++++++++++++- .../RoomMemberProfileFragment.kt | 44 ++++++++++++++++++- vector/src/main/res/values/strings.xml | 2 + 6 files changed, 107 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a028ef6f1e..579124ce45 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ Changes in Element 1.0.14 (2020-XX-XX) =================================================== Features ✨: + - Allow changing nick colors (#2610) - Enable url previews for notices (#2562) Improvements 🙌: diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/accountdata/UserAccountDataTypes.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/accountdata/UserAccountDataTypes.kt index 69b15ff7d4..91167d896f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/accountdata/UserAccountDataTypes.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/accountdata/UserAccountDataTypes.kt @@ -27,4 +27,5 @@ object UserAccountDataTypes { const val TYPE_ALLOWED_WIDGETS = "im.vector.setting.allowed_widgets" const val TYPE_IDENTITY_SERVER = "m.identity_server" const val TYPE_ACCEPTED_TERMS = "m.accepted_terms" + const val TYPE_OVERRIDE_COLORS = "im.vector.setting.override_colors" } diff --git a/vector/src/main/java/im/vector/app/AppStateHandler.kt b/vector/src/main/java/im/vector/app/AppStateHandler.kt index 1e92f7bc67..b2791c0978 100644 --- a/vector/src/main/java/im/vector/app/AppStateHandler.kt +++ b/vector/src/main/java/im/vector/app/AppStateHandler.kt @@ -23,12 +23,15 @@ import arrow.core.Option import im.vector.app.features.grouplist.ALL_COMMUNITIES_GROUP_ID import im.vector.app.features.grouplist.SelectedGroupDataSource import im.vector.app.features.home.HomeRoomListDataSource +import im.vector.app.features.home.room.detail.timeline.helper.MatrixItemColorProvider import im.vector.app.features.home.room.list.ChronologicalRoomComparator import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.CompositeDisposable import io.reactivex.functions.BiFunction import io.reactivex.rxkotlin.addTo +import org.matrix.android.sdk.api.session.accountdata.UserAccountDataTypes +import org.matrix.android.sdk.api.session.events.model.toModel import org.matrix.android.sdk.api.session.group.model.GroupSummary import org.matrix.android.sdk.api.session.room.model.RoomSummary import org.matrix.android.sdk.api.session.room.roomSummaryQueryParams @@ -46,13 +49,15 @@ class AppStateHandler @Inject constructor( private val sessionDataSource: ActiveSessionDataSource, private val homeRoomListDataSource: HomeRoomListDataSource, private val selectedGroupDataSource: SelectedGroupDataSource, - private val chronologicalRoomComparator: ChronologicalRoomComparator) : LifecycleObserver { + private val chronologicalRoomComparator: ChronologicalRoomComparator, + private val matrixItemColorProvider: MatrixItemColorProvider) : LifecycleObserver { private val compositeDisposable = CompositeDisposable() @OnLifecycleEvent(Lifecycle.Event.ON_RESUME) fun entersForeground() { observeRoomsAndGroup() + observeUserAccountData() } @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) @@ -93,4 +98,19 @@ class AppStateHandler @Inject constructor( } .addTo(compositeDisposable) } + + private fun observeUserAccountData() { + sessionDataSource.observe() + .observeOn(AndroidSchedulers.mainThread()) + .switchMap { + it.orNull()?.rx()?.liveAccountData(setOf(UserAccountDataTypes.TYPE_OVERRIDE_COLORS)) + ?: Observable.just(emptyList()) + } + .distinctUntilChanged() + .subscribe { + val overrideColorSpecs = it?.first()?.content?.toModel>() + matrixItemColorProvider.setOverrideColors(overrideColorSpecs) + } + .addTo(compositeDisposable) + } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MatrixItemColorProvider.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MatrixItemColorProvider.kt index 6a590206cb..dcbfb13dcc 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MatrixItemColorProvider.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MatrixItemColorProvider.kt @@ -44,6 +44,39 @@ class MatrixItemColorProvider @Inject constructor( } } + fun setOverrideColors(overrideColors: Map?) { + overrideColors?.forEach() { + setOverrideColor(it.key, it.value) + } + } + + fun setOverrideColor(id: String, colorSpec: String?) : Boolean { + val color = parseUserColorSpec(colorSpec) + if (color == null) { + cache.remove(id) + return false + } else { + cache.put(id, color) + return true + } + } + + @ColorInt + private fun parseUserColorSpec(colorText: String?): Int? { + if (colorText.isNullOrBlank()) { + return null + } + try { + if (colorText.first() == '#') { + return (colorText.substring(1).toLong(radix = 16) or 0xff000000L).toInt() + } else { + return colorProvider.getColor(getUserColorByIndex(colorText.toInt())) + } + } catch (e: Throwable) { + return null + } + } + companion object { @ColorRes @VisibleForTesting @@ -52,7 +85,12 @@ class MatrixItemColorProvider @Inject constructor( userId?.toList()?.map { chr -> hash = (hash shl 5) - hash + chr.toInt() } - return when (abs(hash) % 8) { + return getUserColorByIndex(abs(hash)) + } + + @ColorRes + private fun getUserColorByIndex(index: Int): Int { + return when (index % 8) { 1 -> R.color.riotx_username_2 2 -> R.color.riotx_username_3 3 -> R.color.riotx_username_4 diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt index 08a251834e..3c0ff15fb8 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt @@ -43,6 +43,7 @@ import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.platform.StateView import im.vector.app.core.platform.VectorBaseFragment import im.vector.app.core.utils.startSharePlainTextIntent +import im.vector.app.databinding.DialogBaseEditTextBinding import im.vector.app.databinding.DialogShareQrCodeBinding import im.vector.app.databinding.FragmentMatrixProfileBinding import im.vector.app.databinding.ViewStubRoomMemberProfileHeaderBinding @@ -50,9 +51,11 @@ import im.vector.app.features.crypto.verification.VerificationBottomSheet import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.room.detail.RoomDetailPendingAction import im.vector.app.features.home.room.detail.RoomDetailPendingActionStore +import im.vector.app.features.home.room.detail.timeline.helper.MatrixItemColorProvider import im.vector.app.features.roommemberprofile.devices.DeviceListBottomSheet import im.vector.app.features.roommemberprofile.powerlevel.EditPowerLevelDialogs import kotlinx.parcelize.Parcelize +import org.matrix.android.sdk.api.session.accountdata.UserAccountDataTypes import org.matrix.android.sdk.api.session.room.powerlevels.Role import org.matrix.android.sdk.api.util.MatrixItem import javax.inject.Inject @@ -67,7 +70,8 @@ class RoomMemberProfileFragment @Inject constructor( val viewModelFactory: RoomMemberProfileViewModel.Factory, private val roomMemberProfileController: RoomMemberProfileController, private val avatarRenderer: AvatarRenderer, - private val roomDetailPendingActionStore: RoomDetailPendingActionStore + private val roomDetailPendingActionStore: RoomDetailPendingActionStore, + private val matrixItemColorProvider: MatrixItemColorProvider ) : VectorBaseFragment(), RoomMemberProfileController.Callback { @@ -199,6 +203,7 @@ class RoomMemberProfileFragment @Inject constructor( headerViews.memberProfileIdView.text = userMatrixItem.id val bestName = userMatrixItem.getBestName() headerViews.memberProfileNameView.text = bestName + headerViews.memberProfileNameView.setTextColor(matrixItemColorProvider.getColor(userMatrixItem)) views.matrixProfileToolbarTitleView.text = bestName avatarRenderer.render(userMatrixItem, headerViews.memberProfileAvatarView) avatarRenderer.render(userMatrixItem, views.matrixProfileToolbarAvatarImageView) @@ -237,6 +242,9 @@ class RoomMemberProfileFragment @Inject constructor( headerViews.memberProfileAvatarView.setOnClickListener { view -> onAvatarClicked(view, userMatrixItem) } + headerViews.memberProfileNameView.setOnClickListener { _ -> + onProfileNameClicked(userMatrixItem) + } views.matrixProfileToolbarAvatarImageView.setOnClickListener { view -> onAvatarClicked(view, userMatrixItem) } @@ -323,6 +331,40 @@ class RoomMemberProfileFragment @Inject constructor( navigator.openBigImageViewer(requireActivity(), view, userMatrixItem) } + private fun onProfileNameClicked(userMatrixItem: MatrixItem) { + val inflater = requireActivity().layoutInflater + val layout = inflater.inflate(R.layout.dialog_base_edit_text, null) + val views = DialogBaseEditTextBinding.bind(layout) + val session = injector().activeSessionHolder().getActiveSession() + val overrideColorsSetting = session.getAccountDataEvent(UserAccountDataTypes.TYPE_OVERRIDE_COLORS) + val overrideColorSpecs = overrideColorsSetting?.content?.toMap().orEmpty() + val overrideColorSpec = overrideColorSpecs[userMatrixItem.id]?.toString() + views.editText.setText(overrideColorSpec) + views.editText.hint = "#000000" + + AlertDialog.Builder(requireActivity()) + .setTitle(R.string.room_member_override_color) + .setView(layout) + .setPositiveButton(R.string.ok) { _, _ -> + val newOverrideColorSpec = views.editText.text.toString() + if (newOverrideColorSpec != overrideColorSpec) { + val newOverrideColorSpecs = overrideColorSpecs.toMutableMap() + if (matrixItemColorProvider.setOverrideColor(userMatrixItem.id, newOverrideColorSpec)) { + newOverrideColorSpecs[userMatrixItem.id] = newOverrideColorSpec + } else { + newOverrideColorSpecs.remove(userMatrixItem.id) + } + session.updateAccountData( + type = UserAccountDataTypes.TYPE_OVERRIDE_COLORS, + content = newOverrideColorSpecs + ) + headerViews.memberProfileNameView.setTextColor(matrixItemColorProvider.getColor(userMatrixItem)) + } + } + .setNegativeButton(R.string.cancel, null) + .show() + } + override fun onEditPowerLevel(currentRole: Role) { EditPowerLevelDialogs.showChoice(requireActivity(), currentRole) { newPowerLevel -> viewModel.handle(RoomMemberProfileAction.SetPowerLevel(currentRole.value, newPowerLevel, true)) diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 76541460d2..61bc5dec94 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2241,6 +2241,8 @@ Leave "Leaving the room…" + Override color + Admins Moderators Custom From 889a9a17983a4241a285d3d12aeee1e6fb7a4d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Radics?= Date: Sun, 3 Jan 2021 21:42:33 +0100 Subject: [PATCH 2/6] [issue-2610] fix NoSuchElement error --- vector/src/main/java/im/vector/app/AppStateHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/AppStateHandler.kt b/vector/src/main/java/im/vector/app/AppStateHandler.kt index b2791c0978..303433db67 100644 --- a/vector/src/main/java/im/vector/app/AppStateHandler.kt +++ b/vector/src/main/java/im/vector/app/AppStateHandler.kt @@ -108,7 +108,7 @@ class AppStateHandler @Inject constructor( } .distinctUntilChanged() .subscribe { - val overrideColorSpecs = it?.first()?.content?.toModel>() + val overrideColorSpecs = it?.firstOrNull()?.content?.toModel>() matrixItemColorProvider.setOverrideColors(overrideColorSpecs) } .addTo(compositeDisposable) From 0e400dca24a69636059bf23b03068cfe40197709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Radics?= Date: Wed, 3 Feb 2021 20:04:24 +0100 Subject: [PATCH 3/6] [issue-2610] Add Override Color menu item under More... --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../RoomMemberProfileController.kt | 13 +++++++++++-- .../RoomMemberProfileFragment.kt | 15 ++++++++------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 247e2b90ad..73f88221b1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ #Fri Jan 15 11:30:47 CET 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=a7ca23b3ccf265680f2bfd35f1f00b1424f4466292c7337c85d46c9641b3f053 +#distributionSha256Sum=a7ca23b3ccf265680f2bfd35f1f00b1424f4466292c7337c85d46c9641b3f053 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileController.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileController.kt index e29c197ab8..9c2d2ded70 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileController.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileController.kt @@ -46,6 +46,7 @@ class RoomMemberProfileController @Inject constructor( fun onShowDeviceList() fun onShowDeviceListNoCrossSigning() fun onOpenDmClicked() + fun onOverrideColorClicked() fun onJumpToReadReceiptClicked() fun onMentionClicked() fun onEditPowerLevel(currentRole: Role) @@ -180,11 +181,19 @@ class RoomMemberProfileController @Inject constructor( private fun buildMoreSection(state: RoomMemberProfileViewState) { // More + buildProfileSection(stringProvider.getString(R.string.room_profile_section_more)) + + buildProfileAction( + id = "overrideColor", + editable = false, + title = stringProvider.getString(R.string.room_member_override_color), + dividerColor = dividerColor, + action = { callback?.onOverrideColorClicked() } + ) + if (!state.isMine) { val membership = state.asyncMembership() ?: return - buildProfileSection(stringProvider.getString(R.string.room_profile_section_more)) - buildProfileAction( id = "direct", editable = false, diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt index 92cdf305fe..2099b706eb 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt @@ -243,7 +243,7 @@ class RoomMemberProfileFragment @Inject constructor( onAvatarClicked(view, userMatrixItem) } headerViews.memberProfileNameView.setOnClickListener { _ -> - onProfileNameClicked(userMatrixItem) + onOverrideColorClicked() } views.matrixProfileToolbarAvatarImageView.setOnClickListener { view -> onAvatarClicked(view, userMatrixItem) @@ -331,14 +331,15 @@ class RoomMemberProfileFragment @Inject constructor( navigator.openBigImageViewer(requireActivity(), view, userMatrixItem) } - private fun onProfileNameClicked(userMatrixItem: MatrixItem) { + override fun onOverrideColorClicked(): Unit = withState(viewModel) { state -> val inflater = requireActivity().layoutInflater val layout = inflater.inflate(R.layout.dialog_base_edit_text, null) val views = DialogBaseEditTextBinding.bind(layout) val session = injector().activeSessionHolder().getActiveSession() val overrideColorsSetting = session.getAccountDataEvent(UserAccountDataTypes.TYPE_OVERRIDE_COLORS) val overrideColorSpecs = overrideColorsSetting?.content?.toMap().orEmpty() - val overrideColorSpec = overrideColorSpecs[userMatrixItem.id]?.toString() + val userId = state.userId; + val overrideColorSpec = overrideColorSpecs[userId]?.toString() views.editText.setText(overrideColorSpec) views.editText.hint = "#000000" @@ -349,16 +350,16 @@ class RoomMemberProfileFragment @Inject constructor( val newOverrideColorSpec = views.editText.text.toString() if (newOverrideColorSpec != overrideColorSpec) { val newOverrideColorSpecs = overrideColorSpecs.toMutableMap() - if (matrixItemColorProvider.setOverrideColor(userMatrixItem.id, newOverrideColorSpec)) { - newOverrideColorSpecs[userMatrixItem.id] = newOverrideColorSpec + if (matrixItemColorProvider.setOverrideColor(userId, newOverrideColorSpec)) { + newOverrideColorSpecs[userId] = newOverrideColorSpec } else { - newOverrideColorSpecs.remove(userMatrixItem.id) + newOverrideColorSpecs.remove(userId) } session.updateAccountData( type = UserAccountDataTypes.TYPE_OVERRIDE_COLORS, content = newOverrideColorSpecs ) - headerViews.memberProfileNameView.setTextColor(matrixItemColorProvider.getColor(userMatrixItem)) + invalidate() } } .setNegativeButton(R.string.cancel, null) From f7d8127fa669dc1fe4d4ac5b195b0a4cd19779f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Radics?= Date: Wed, 3 Feb 2021 21:04:47 +0100 Subject: [PATCH 4/6] [issue-2610] remove extra semicolon --- .../app/features/roommemberprofile/RoomMemberProfileFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt index 2099b706eb..a60b7368fa 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt @@ -338,7 +338,7 @@ class RoomMemberProfileFragment @Inject constructor( val session = injector().activeSessionHolder().getActiveSession() val overrideColorsSetting = session.getAccountDataEvent(UserAccountDataTypes.TYPE_OVERRIDE_COLORS) val overrideColorSpecs = overrideColorsSetting?.content?.toMap().orEmpty() - val userId = state.userId; + val userId = state.userId val overrideColorSpec = overrideColorSpecs[userId]?.toString() views.editText.setText(overrideColorSpec) views.editText.hint = "#000000" From cc15f9b1298d0da8c39afa71b7e19fc5d58d8f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Radics?= Date: Sat, 6 Feb 2021 09:34:31 +0100 Subject: [PATCH 5/6] [issue-2610] remove click handler from display-name Remove the click handler that opens the override color dialog from the display-name part on the member profile page, as this is not really discoverable and we have a proper menu item for it now. --- .../features/roommemberprofile/RoomMemberProfileFragment.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt index a60b7368fa..e50645ae01 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt @@ -242,9 +242,6 @@ class RoomMemberProfileFragment @Inject constructor( headerViews.memberProfileAvatarView.setOnClickListener { view -> onAvatarClicked(view, userMatrixItem) } - headerViews.memberProfileNameView.setOnClickListener { _ -> - onOverrideColorClicked() - } views.matrixProfileToolbarAvatarImageView.setOnClickListener { view -> onAvatarClicked(view, userMatrixItem) } From db97046f082a0417f2195b0dd0ffcef724352569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Radics?= Date: Sat, 13 Feb 2021 13:30:31 +0100 Subject: [PATCH 6/6] [issue-2610] change menu text to "Override nick color" --- .../features/roommemberprofile/RoomMemberProfileController.kt | 2 +- .../app/features/roommemberprofile/RoomMemberProfileFragment.kt | 2 +- vector/src/main/res/values/strings.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileController.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileController.kt index 2a01e45f93..ba114e2e05 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileController.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileController.kt @@ -184,7 +184,7 @@ class RoomMemberProfileController @Inject constructor( buildProfileAction( id = "overrideColor", editable = false, - title = stringProvider.getString(R.string.room_member_override_color), + title = stringProvider.getString(R.string.room_member_override_nick_color), dividerColor = dividerColor, action = { callback?.onOverrideColorClicked() } ) diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt index e50645ae01..04ee40668e 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt @@ -341,7 +341,7 @@ class RoomMemberProfileFragment @Inject constructor( views.editText.hint = "#000000" AlertDialog.Builder(requireActivity()) - .setTitle(R.string.room_member_override_color) + .setTitle(R.string.room_member_override_nick_color) .setView(layout) .setPositiveButton(R.string.ok) { _, _ -> val newOverrideColorSpec = views.editText.text.toString() diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 2b98efc765..085c999713 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2273,7 +2273,7 @@ Leave "Leaving the room…" - Override color + Override nick color Admins Moderators