diff --git a/vector/src/main/java/im/vector/riotx/features/crypto/verification/cancel/VerificationCancelController.kt b/vector/src/main/java/im/vector/riotx/features/crypto/verification/cancel/VerificationCancelController.kt
index 65ed1de555..49b2f7dce1 100644
--- a/vector/src/main/java/im/vector/riotx/features/crypto/verification/cancel/VerificationCancelController.kt
+++ b/vector/src/main/java/im/vector/riotx/features/crypto/verification/cancel/VerificationCancelController.kt
@@ -16,11 +16,13 @@
package im.vector.riotx.features.crypto.verification.cancel
+import androidx.core.text.toSpannable
import com.airbnb.epoxy.EpoxyController
import im.vector.riotx.R
import im.vector.riotx.core.epoxy.dividerItem
import im.vector.riotx.core.resources.ColorProvider
import im.vector.riotx.core.resources.StringProvider
+import im.vector.riotx.core.utils.colorizeMatchingText
import im.vector.riotx.features.crypto.verification.VerificationBottomSheetViewState
import im.vector.riotx.features.crypto.verification.epoxy.bottomSheetVerificationActionItem
import im.vector.riotx.features.crypto.verification.epoxy.bottomSheetVerificationNoticeItem
@@ -56,9 +58,15 @@ class VerificationCancelController @Inject constructor(
}
}
} else {
+ val otherUserID = state.otherUserMxItem?.id ?: ""
+ val otherDisplayName = state.otherUserMxItem?.displayName ?: ""
bottomSheetVerificationNoticeItem {
id("notice")
- notice(stringProvider.getString(R.string.verify_cancel_other))
+ notice(
+ stringProvider.getString(R.string.verify_cancel_other, otherDisplayName, otherUserID)
+ .toSpannable()
+ .colorizeMatchingText(otherUserID, colorProvider.getColorFromAttribute(R.attr.vctr_notice_text_color))
+ )
}
}
diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml
index 568513bf62..ccb4bfa9be 100644
--- a/vector/src/main/res/values/strings_riotX.xml
+++ b/vector/src/main/res/values/strings_riotX.xml
@@ -23,7 +23,7 @@
If you cancel, you won’t be able to read encrypted messages on this device, and other users won’t trust it
If you cancel, you won’t be able to read encrypted messages on your new device, and other users won’t trust it
- You can verify them later from their user profile.
+ You won’t verify %1$s (%2$s) if you cancel now. Start again in their user profile.
One of the following may be compromised:\n\n- Your password\n- Your homeserver\n- This device, or the other device\n- The internet connection either device is using\n\nWe recommend you change your password & recovery key in Settings immediately.