mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Fix / cancel copy when verifying other
This commit is contained in:
parent
42a8c561db
commit
1de57bbf3b
@ -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))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
<string name="verify_cancel_self_verification_from_untrusted">If you cancel, you won’t be able to read encrypted messages on this device, and other users won’t trust it</string>
|
||||
<string name="verify_cancel_self_verification_from_trusted">If you cancel, you won’t be able to read encrypted messages on your new device, and other users won’t trust it</string>
|
||||
<string name="verify_cancel_other">You can verify them later from their user profile.</string>
|
||||
<string name="verify_cancel_other">You won’t verify %1$s (%2$s) if you cancel now. Start again in their user profile.</string>
|
||||
|
||||
<string name="verify_not_me_self_verification">
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user