Merge pull request #1218 from vector-im/feature/scan_confirm_update
Feature/scan confirm update
This commit is contained in:
commit
ac46fe9e16
@ -15,6 +15,7 @@ Improvements 🙌:
|
||||
- Cross-Signing | Gossip key backup recovery key (#1200)
|
||||
- Show room encryption status as a bubble tile (#1078)
|
||||
- Cross-Signing | Restore history after recover from passphrase (#1214)
|
||||
- Cross-Sign | QR code scan confirmation screens design update (#1187)
|
||||
|
||||
Bugfix 🐛:
|
||||
- Missing avatar/displayname after verification request message (#841)
|
||||
|
@ -43,6 +43,7 @@ sealed class VerificationTxState {
|
||||
|
||||
// Will be used to ask the user if the other user has correctly scanned
|
||||
object QrScannedByOther : VerificationQrTxState()
|
||||
object WaitingOtherReciprocateConfirm : VerificationQrTxState()
|
||||
|
||||
// Terminal states
|
||||
abstract class TerminalTxState : VerificationTxState()
|
||||
|
@ -646,9 +646,7 @@ internal class DefaultVerificationService @Inject constructor(
|
||||
))
|
||||
}
|
||||
|
||||
if (existingTransaction is SASDefaultVerificationTransaction) {
|
||||
existingTransaction.state = VerificationTxState.Cancelled(safeValueOf(cancelReq.code), false)
|
||||
}
|
||||
existingTransaction?.state = VerificationTxState.Cancelled(safeValueOf(cancelReq.code), false)
|
||||
}
|
||||
|
||||
private fun onRoomAcceptReceived(event: Event) {
|
||||
@ -792,26 +790,53 @@ internal class DefaultVerificationService @Inject constructor(
|
||||
private fun onDoneReceived(event: Event) {
|
||||
Timber.v("## onDoneReceived")
|
||||
val doneReq = event.getClearContent().toModel<KeyVerificationDone>()?.asValidObject()
|
||||
if (doneReq == null || event.senderId != userId) {
|
||||
if (doneReq == null || event.senderId == null) {
|
||||
// ignore
|
||||
Timber.e("## SAS Received invalid done request")
|
||||
return
|
||||
}
|
||||
|
||||
// We only send gossiping request when the other sent us a done
|
||||
// We can ask without checking too much thinks (like trust), because we will check validity of secret on reception
|
||||
getExistingTransaction(userId, doneReq.transactionId)
|
||||
?: getOldTransaction(userId, doneReq.transactionId)
|
||||
?.let { vt ->
|
||||
val otherDeviceId = vt.otherDeviceId
|
||||
if (!crossSigningService.canCrossSign()) {
|
||||
outgoingGossipingRequestManager.sendSecretShareRequest(SELF_SIGNING_KEY_SSSS_NAME, mapOf(userId to listOf(otherDeviceId
|
||||
?: "*")))
|
||||
outgoingGossipingRequestManager.sendSecretShareRequest(USER_SIGNING_KEY_SSSS_NAME, mapOf(userId to listOf(otherDeviceId
|
||||
handleDoneReceived(event.senderId, doneReq)
|
||||
|
||||
if (event.senderId == userId) {
|
||||
// We only send gossiping request when the other sent us a done
|
||||
// We can ask without checking too much thinks (like trust), because we will check validity of secret on reception
|
||||
getExistingTransaction(userId, doneReq.transactionId)
|
||||
?: getOldTransaction(userId, doneReq.transactionId)
|
||||
?.let { vt ->
|
||||
val otherDeviceId = vt.otherDeviceId
|
||||
if (!crossSigningService.canCrossSign()) {
|
||||
outgoingGossipingRequestManager.sendSecretShareRequest(SELF_SIGNING_KEY_SSSS_NAME, mapOf(userId to listOf(otherDeviceId
|
||||
?: "*")))
|
||||
outgoingGossipingRequestManager.sendSecretShareRequest(USER_SIGNING_KEY_SSSS_NAME, mapOf(userId to listOf(otherDeviceId
|
||||
?: "*")))
|
||||
}
|
||||
outgoingGossipingRequestManager.sendSecretShareRequest(KEYBACKUP_SECRET_SSSS_NAME, mapOf(userId to listOf(otherDeviceId
|
||||
?: "*")))
|
||||
}
|
||||
outgoingGossipingRequestManager.sendSecretShareRequest(KEYBACKUP_SECRET_SSSS_NAME, mapOf(userId to listOf(otherDeviceId ?: "*")))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleDoneReceived(senderId: String, doneReq: ValidVerificationDone) {
|
||||
Timber.v("## SAS Done receieved $doneReq")
|
||||
val existing = getExistingTransaction(senderId, doneReq.transactionId)
|
||||
if (existing == null) {
|
||||
Timber.e("## SAS Received invalid Done request")
|
||||
return
|
||||
}
|
||||
if (existing is DefaultQrCodeVerificationTransaction) {
|
||||
existing.onDoneReceived()
|
||||
} else {
|
||||
// SAS do not care for now?
|
||||
}
|
||||
|
||||
// Now transactions are udated, let's also update Requests
|
||||
val existingRequest = getExistingVerificationRequest(senderId)?.find { it.transactionId == doneReq.transactionId }
|
||||
if (existingRequest == null) {
|
||||
Timber.e("## SAS Received Done for unknown request txId:${doneReq.transactionId}")
|
||||
return
|
||||
}
|
||||
updatePendingRequest(existingRequest.copy(isSuccessful = true))
|
||||
}
|
||||
|
||||
private fun onRoomDoneReceived(event: Event) {
|
||||
@ -993,14 +1018,14 @@ internal class DefaultVerificationService @Inject constructor(
|
||||
)
|
||||
}
|
||||
|
||||
private fun handleDoneReceived(senderId: String, doneInfo: ValidVerificationDone) {
|
||||
val existingRequest = getExistingVerificationRequest(senderId)?.find { it.transactionId == doneInfo.transactionId }
|
||||
if (existingRequest == null) {
|
||||
Timber.e("## SAS Received Done for unknown request txId:${doneInfo.transactionId}")
|
||||
return
|
||||
}
|
||||
updatePendingRequest(existingRequest.copy(isSuccessful = true))
|
||||
}
|
||||
// private fun handleDoneReceived(senderId: String, doneInfo: ValidVerificationDone) {
|
||||
// val existingRequest = getExistingVerificationRequest(senderId)?.find { it.transactionId == doneInfo.transactionId }
|
||||
// if (existingRequest == null) {
|
||||
// Timber.e("## SAS Received Done for unknown request txId:${doneInfo.transactionId}")
|
||||
// return
|
||||
// }
|
||||
// updatePendingRequest(existingRequest.copy(isSuccessful = true))
|
||||
// }
|
||||
|
||||
// TODO All this methods should be delegated to a TransactionStore
|
||||
override fun getExistingTransaction(otherUserId: String, tid: String): VerificationTransaction? {
|
||||
|
@ -57,7 +57,7 @@ internal abstract class DefaultVerificationTransaction(
|
||||
|
||||
protected fun trust(canTrustOtherUserMasterKey: Boolean,
|
||||
toVerifyDeviceIds: List<String>,
|
||||
eventuallyMarkMyMasterKeyAsTrusted: Boolean) {
|
||||
eventuallyMarkMyMasterKeyAsTrusted: Boolean, autoDone : Boolean = true) {
|
||||
Timber.d("## Verification: trust ($otherUserId,$otherDeviceId) , verifiedDevices:$toVerifyDeviceIds")
|
||||
Timber.d("## Verification: trust Mark myMSK trusted $eventuallyMarkMyMasterKeyAsTrusted")
|
||||
|
||||
@ -97,14 +97,9 @@ internal abstract class DefaultVerificationTransaction(
|
||||
})
|
||||
}
|
||||
|
||||
state = VerificationTxState.Verified
|
||||
|
||||
transport.done(transactionId) {
|
||||
// if (otherUserId == userId && !crossSigningService.canCrossSign()) {
|
||||
// outgoingGossipingRequestManager.sendSecretShareRequest(SELF_SIGNING_KEY_SSSS_NAME, mapOf(userId to listOf(otherDeviceId ?: "*")))
|
||||
// outgoingGossipingRequestManager.sendSecretShareRequest(USER_SIGNING_KEY_SSSS_NAME, mapOf(userId to listOf(otherDeviceId ?: "*")))
|
||||
// outgoingGossipingRequestManager.sendSecretShareRequest(KEYBACKUP_SECRET_SSSS_NAME, mapOf(userId to listOf(otherDeviceId ?: "*")))
|
||||
// }
|
||||
if (autoDone) {
|
||||
state = VerificationTxState.Verified
|
||||
transport.done(transactionId) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,12 +15,12 @@
|
||||
*/
|
||||
package im.vector.matrix.android.internal.crypto.verification
|
||||
|
||||
internal interface VerificationInfoDone : VerificationInfo<ValidVerificationInfoDone> {
|
||||
import im.vector.matrix.android.api.session.room.model.message.ValidVerificationDone
|
||||
|
||||
override fun asValidObject(): ValidVerificationInfoDone? {
|
||||
internal interface VerificationInfoDone : VerificationInfo<ValidVerificationDone> {
|
||||
|
||||
override fun asValidObject(): ValidVerificationDone? {
|
||||
val validTransactionId = transactionId?.takeIf { it.isNotEmpty() } ?: return null
|
||||
return ValidVerificationInfoDone(validTransactionId)
|
||||
return ValidVerificationDone(validTransactionId)
|
||||
}
|
||||
}
|
||||
|
||||
internal data class ValidVerificationInfoDone(val transactionId: String)
|
||||
|
@ -187,9 +187,12 @@ internal class DefaultQrCodeVerificationTransaction(
|
||||
// qrCodeData.sharedSecret will be used to send the start request
|
||||
start(otherQrCodeData.sharedSecret)
|
||||
|
||||
trust(canTrustOtherUserMasterKey,
|
||||
toVerifyDeviceIds.distinct(),
|
||||
eventuallyMarkMyMasterKeyAsTrusted = true)
|
||||
trust(
|
||||
canTrustOtherUserMasterKey = canTrustOtherUserMasterKey,
|
||||
toVerifyDeviceIds = toVerifyDeviceIds.distinct(),
|
||||
eventuallyMarkMyMasterKeyAsTrusted = true,
|
||||
autoDone = false
|
||||
)
|
||||
}
|
||||
|
||||
private fun start(remoteSecret: String, onDone: (() -> Unit)? = null) {
|
||||
@ -199,6 +202,7 @@ internal class DefaultQrCodeVerificationTransaction(
|
||||
throw IllegalStateException("Interactive Key verification already started")
|
||||
}
|
||||
|
||||
state = VerificationTxState.Started
|
||||
val startMessage = transport.createStartForQrCode(
|
||||
deviceId,
|
||||
transactionId,
|
||||
@ -208,7 +212,7 @@ internal class DefaultQrCodeVerificationTransaction(
|
||||
transport.sendToOther(
|
||||
EventType.KEY_VERIFICATION_START,
|
||||
startMessage,
|
||||
VerificationTxState.Started,
|
||||
VerificationTxState.WaitingOtherReciprocateConfirm,
|
||||
CancelCode.User,
|
||||
onDone
|
||||
)
|
||||
@ -244,6 +248,15 @@ internal class DefaultQrCodeVerificationTransaction(
|
||||
}
|
||||
}
|
||||
|
||||
fun onDoneReceived() {
|
||||
if (state != VerificationTxState.WaitingOtherReciprocateConfirm) {
|
||||
cancel(CancelCode.UnexpectedMessage)
|
||||
return
|
||||
}
|
||||
state = VerificationTxState.Verified
|
||||
transport.done(transactionId) {}
|
||||
}
|
||||
|
||||
override fun otherUserScannedMyQrCode() {
|
||||
when (qrCodeData) {
|
||||
is QrCodeData.VerifyingAnotherUser -> {
|
||||
@ -265,6 +278,6 @@ internal class DefaultQrCodeVerificationTransaction(
|
||||
override fun otherUserDidNotScannedMyQrCode() {
|
||||
// What can I do then?
|
||||
// At least remove the transaction...
|
||||
state = VerificationTxState.Cancelled(CancelCode.MismatchedKeys, true)
|
||||
cancel(CancelCode.MismatchedKeys)
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import im.vector.riotx.features.crypto.verification.cancel.VerificationNotMeFrag
|
||||
import im.vector.riotx.features.crypto.verification.choose.VerificationChooseMethodFragment
|
||||
import im.vector.riotx.features.crypto.verification.conclusion.VerificationConclusionFragment
|
||||
import im.vector.riotx.features.crypto.verification.emoji.VerificationEmojiCodeFragment
|
||||
import im.vector.riotx.features.crypto.verification.qrconfirmation.VerificationQRWaitingFragment
|
||||
import im.vector.riotx.features.crypto.verification.qrconfirmation.VerificationQrScannedByOtherFragment
|
||||
import im.vector.riotx.features.crypto.verification.request.VerificationRequestFragment
|
||||
import im.vector.riotx.features.grouplist.GroupListFragment
|
||||
@ -339,6 +340,11 @@ interface FragmentModule {
|
||||
@FragmentKey(VerificationQrScannedByOtherFragment::class)
|
||||
fun bindVerificationQrScannedByOtherFragment(fragment: VerificationQrScannedByOtherFragment): Fragment
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FragmentKey(VerificationQRWaitingFragment::class)
|
||||
fun bindVerificationQRWaitingFragment(fragment: VerificationQRWaitingFragment): Fragment
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FragmentKey(VerificationConclusionFragment::class)
|
||||
|
@ -50,6 +50,7 @@ import im.vector.riotx.features.crypto.verification.cancel.VerificationNotMeFrag
|
||||
import im.vector.riotx.features.crypto.verification.choose.VerificationChooseMethodFragment
|
||||
import im.vector.riotx.features.crypto.verification.conclusion.VerificationConclusionFragment
|
||||
import im.vector.riotx.features.crypto.verification.emoji.VerificationEmojiCodeFragment
|
||||
import im.vector.riotx.features.crypto.verification.qrconfirmation.VerificationQRWaitingFragment
|
||||
import im.vector.riotx.features.crypto.verification.qrconfirmation.VerificationQrScannedByOtherFragment
|
||||
import im.vector.riotx.features.crypto.verification.request.VerificationRequestFragment
|
||||
import im.vector.riotx.features.home.AvatarRenderer
|
||||
@ -244,6 +245,13 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||
showFragment(VerificationQrScannedByOtherFragment::class, Bundle())
|
||||
return@withState
|
||||
}
|
||||
is VerificationTxState.Started,
|
||||
is VerificationTxState.WaitingOtherReciprocateConfirm -> {
|
||||
showFragment(VerificationQRWaitingFragment::class, Bundle().apply {
|
||||
putParcelable(MvRx.KEY_ARG, VerificationQRWaitingFragment.Args(state.isMe, state.otherUserMxItem?.getBestName() ?: ""))
|
||||
})
|
||||
return@withState
|
||||
}
|
||||
is VerificationTxState.Verified -> {
|
||||
showFragment(VerificationConclusionFragment::class, Bundle().apply {
|
||||
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
|
||||
|
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 2020 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.riotx.features.crypto.verification.qrconfirmation
|
||||
|
||||
import com.airbnb.epoxy.EpoxyController
|
||||
import im.vector.riotx.R
|
||||
import im.vector.riotx.core.resources.ColorProvider
|
||||
import im.vector.riotx.core.resources.StringProvider
|
||||
import im.vector.riotx.features.crypto.verification.epoxy.bottomSheetVerificationBigImageItem
|
||||
import im.vector.riotx.features.crypto.verification.epoxy.bottomSheetVerificationNoticeItem
|
||||
import im.vector.riotx.features.crypto.verification.epoxy.bottomSheetVerificationWaitingItem
|
||||
import javax.inject.Inject
|
||||
|
||||
class VerificationQRWaitingController @Inject constructor(
|
||||
private val stringProvider: StringProvider,
|
||||
private val colorProvider: ColorProvider
|
||||
) : EpoxyController() {
|
||||
|
||||
private var args: VerificationQRWaitingFragment.Args? = null
|
||||
|
||||
fun update(args: VerificationQRWaitingFragment.Args) {
|
||||
this.args = args
|
||||
requestModelBuild()
|
||||
}
|
||||
|
||||
override fun buildModels() {
|
||||
val params = args ?: return
|
||||
|
||||
bottomSheetVerificationNoticeItem {
|
||||
id("notice")
|
||||
apply {
|
||||
notice(stringProvider.getString(R.string.qr_code_scanned_verif_waiting_notice))
|
||||
}
|
||||
}
|
||||
|
||||
bottomSheetVerificationBigImageItem {
|
||||
id("image")
|
||||
imageRes(R.drawable.ic_shield_trusted)
|
||||
}
|
||||
|
||||
bottomSheetVerificationWaitingItem {
|
||||
id("waiting")
|
||||
title(stringProvider.getString(R.string.qr_code_scanned_verif_waiting, params.otherUserName))
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (c) 2020 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.riotx.features.crypto.verification.qrconfirmation
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.Parcelable
|
||||
import android.view.View
|
||||
import com.airbnb.mvrx.MvRx
|
||||
import im.vector.riotx.R
|
||||
import im.vector.riotx.core.extensions.cleanup
|
||||
import im.vector.riotx.core.extensions.configureWith
|
||||
import im.vector.riotx.core.platform.VectorBaseFragment
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
import kotlinx.android.synthetic.main.bottom_sheet_verification_child_fragment.*
|
||||
import javax.inject.Inject
|
||||
|
||||
class VerificationQRWaitingFragment @Inject constructor(
|
||||
val controller: VerificationQRWaitingController
|
||||
) : VectorBaseFragment() {
|
||||
|
||||
@Parcelize
|
||||
data class Args(
|
||||
val isMe: Boolean,
|
||||
val otherUserName: String
|
||||
) : Parcelable
|
||||
|
||||
override fun getLayoutResId() = R.layout.bottom_sheet_verification_child_fragment
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setupRecyclerView()
|
||||
(arguments?.getParcelable(MvRx.KEY_ARG) as? Args)?.let {
|
||||
controller.update(it)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
bottomSheetVerificationRecyclerView.cleanup()
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
bottomSheetVerificationRecyclerView.configureWith(controller, hasFixedSize = false, disableItemAnimation = true)
|
||||
}
|
||||
}
|
@ -21,7 +21,9 @@ 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.features.crypto.verification.VerificationBottomSheetViewState
|
||||
import im.vector.riotx.features.crypto.verification.epoxy.bottomSheetVerificationActionItem
|
||||
import im.vector.riotx.features.crypto.verification.epoxy.bottomSheetVerificationBigImageItem
|
||||
import im.vector.riotx.features.crypto.verification.epoxy.bottomSheetVerificationNoticeItem
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -32,33 +34,37 @@ class VerificationQrScannedByOtherController @Inject constructor(
|
||||
|
||||
var listener: Listener? = null
|
||||
|
||||
init {
|
||||
private var viewState: VerificationBottomSheetViewState? = null
|
||||
|
||||
fun update(viewState: VerificationBottomSheetViewState) {
|
||||
this.viewState = viewState
|
||||
requestModelBuild()
|
||||
}
|
||||
|
||||
override fun buildModels() {
|
||||
val state = viewState ?: return
|
||||
|
||||
bottomSheetVerificationNoticeItem {
|
||||
id("notice")
|
||||
notice(stringProvider.getString(R.string.qr_code_scanned_by_other_notice))
|
||||
apply {
|
||||
if (state.isMe) {
|
||||
notice(stringProvider.getString(R.string.qr_code_scanned_self_verif_notice))
|
||||
} else {
|
||||
val name = state.otherUserMxItem?.getBestName() ?: ""
|
||||
notice(stringProvider.getString(R.string.qr_code_scanned_by_other_notice, name))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bottomSheetVerificationBigImageItem {
|
||||
id("image")
|
||||
imageRes(R.drawable.ic_shield_trusted)
|
||||
}
|
||||
|
||||
dividerItem {
|
||||
id("sep0")
|
||||
}
|
||||
|
||||
bottomSheetVerificationActionItem {
|
||||
id("confirm")
|
||||
title(stringProvider.getString(R.string.qr_code_scanned_by_other_yes))
|
||||
titleColor(colorProvider.getColor(R.color.riotx_accent))
|
||||
iconRes(R.drawable.ic_check_on)
|
||||
iconColor(colorProvider.getColor(R.color.riotx_accent))
|
||||
listener { listener?.onUserConfirmsQrCodeScanned() }
|
||||
}
|
||||
|
||||
dividerItem {
|
||||
id("sep1")
|
||||
}
|
||||
|
||||
bottomSheetVerificationActionItem {
|
||||
id("deny")
|
||||
title(stringProvider.getString(R.string.qr_code_scanned_by_other_no))
|
||||
@ -67,6 +73,19 @@ class VerificationQrScannedByOtherController @Inject constructor(
|
||||
iconColor(colorProvider.getColor(R.color.vector_error_color))
|
||||
listener { listener?.onUserDeniesQrCodeScanned() }
|
||||
}
|
||||
|
||||
dividerItem {
|
||||
id("sep1")
|
||||
}
|
||||
|
||||
bottomSheetVerificationActionItem {
|
||||
id("confirm")
|
||||
title(stringProvider.getString(R.string.qr_code_scanned_by_other_yes))
|
||||
titleColor(colorProvider.getColor(R.color.riotx_accent))
|
||||
iconRes(R.drawable.ic_check_on)
|
||||
iconColor(colorProvider.getColor(R.color.riotx_accent))
|
||||
listener { listener?.onUserConfirmsQrCodeScanned() }
|
||||
}
|
||||
}
|
||||
|
||||
interface Listener {
|
||||
|
@ -18,6 +18,7 @@ package im.vector.riotx.features.crypto.verification.qrconfirmation
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.airbnb.mvrx.parentFragmentViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
import im.vector.riotx.R
|
||||
import im.vector.riotx.core.extensions.cleanup
|
||||
import im.vector.riotx.core.extensions.configureWith
|
||||
@ -37,10 +38,13 @@ class VerificationQrScannedByOtherFragment @Inject constructor(
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
setupRecyclerView()
|
||||
}
|
||||
|
||||
override fun invalidate() = withState(sharedViewModel) { state ->
|
||||
controller.update(state)
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
bottomSheetVerificationRecyclerView.cleanup()
|
||||
controller.listener = null
|
||||
|
@ -2166,7 +2166,6 @@ Abisua: Fitxategi hau ezabatu daiteke aplikazioa desinstalatzen bada.</string>
|
||||
|
||||
<string name="a11y_qr_code_for_verification">QR kodea</string>
|
||||
|
||||
<string name="qr_code_scanned_by_other_notice">Beste erabiltzaileak QR kodea ongi eskaneatu du\?</string>
|
||||
<string name="qr_code_scanned_by_other_yes">Bai</string>
|
||||
<string name="qr_code_scanned_by_other_no">Ez</string>
|
||||
|
||||
|
@ -2174,7 +2174,6 @@ Si vous n’avez pas configuré de nouvelle méthode de récupération, un attaq
|
||||
|
||||
<string name="a11y_qr_code_for_verification">Code QR</string>
|
||||
|
||||
<string name="qr_code_scanned_by_other_notice">L’autre utilisateur a-t-il bien scanné le code QR \?</string>
|
||||
<string name="qr_code_scanned_by_other_yes">Oui</string>
|
||||
<string name="qr_code_scanned_by_other_no">Non</string>
|
||||
|
||||
|
@ -2169,7 +2169,6 @@ Ha nem te állítottad be a visszaállítási metódust, akkor egy támadó pró
|
||||
|
||||
<string name="a11y_qr_code_for_verification">QR kód</string>
|
||||
|
||||
<string name="qr_code_scanned_by_other_notice">A másik felhasználó sikeresen beolvasta a QR kódot\?</string>
|
||||
<string name="qr_code_scanned_by_other_yes">Igen</string>
|
||||
<string name="qr_code_scanned_by_other_no">Nem</string>
|
||||
|
||||
|
@ -2219,7 +2219,6 @@
|
||||
|
||||
<string name="a11y_qr_code_for_verification">Codice QR</string>
|
||||
|
||||
<string name="qr_code_scanned_by_other_notice">L\'altro utente ha scansionato correttamente il codice QR\?</string>
|
||||
<string name="qr_code_scanned_by_other_yes">Sì</string>
|
||||
<string name="qr_code_scanned_by_other_no">No</string>
|
||||
|
||||
|
@ -2129,7 +2129,6 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani
|
||||
<string name="initialize_cross_signing">Gatit <em>CrossSigning</em></string>
|
||||
<string name="reset_cross_signing">Zeroji Kyçet</string>
|
||||
|
||||
<string name="qr_code_scanned_by_other_notice">A e skanoi me sukses përdoruesi tjetër kodin QR\?</string>
|
||||
<string name="qr_code_scanned_by_other_no">Jo</string>
|
||||
|
||||
<string name="no_connectivity_to_the_server_indicator">Humbi lidhja me shërbyesin</string>
|
||||
|
@ -2119,7 +2119,6 @@ Matrix 中的消息可見度類似于電子郵件。我們忘記您的郵件意
|
||||
|
||||
<string name="a11y_qr_code_for_verification">QR code</string>
|
||||
|
||||
<string name="qr_code_scanned_by_other_notice">其他使用者是否掃苗 QR code 成功?</string>
|
||||
<string name="qr_code_scanned_by_other_yes">是</string>
|
||||
<string name="qr_code_scanned_by_other_no">否</string>
|
||||
|
||||
|
@ -2148,7 +2148,7 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming
|
||||
|
||||
<string name="a11y_qr_code_for_verification">QR code</string>
|
||||
|
||||
<string name="qr_code_scanned_by_other_notice">Did the other user successfully scan the QR code?</string>
|
||||
<string name="qr_code_scanned_by_other_notice">Almost there! Is %s showing the same shield?</string>
|
||||
<string name="qr_code_scanned_by_other_yes">Yes</string>
|
||||
<string name="qr_code_scanned_by_other_no">No</string>
|
||||
|
||||
|
@ -94,6 +94,11 @@
|
||||
<string name="encryption_unknown_algorithm_tile_description">The encryption used by this room is not supported</string>
|
||||
|
||||
<string name="room_created_summary_item">%s created and configured the room.</string>
|
||||
|
||||
<string name="qr_code_scanned_self_verif_notice">Almost there! Is the other device showing the same shield?</string>
|
||||
<string name="qr_code_scanned_verif_waiting_notice">Almost there! Waiting for confirmation…</string>
|
||||
<string name="qr_code_scanned_verif_waiting">Waiting for %s…</string>
|
||||
|
||||
<string name="error_failed_to_import_keys">Failed to import keys</string>
|
||||
|
||||
<!-- END Strings added by Valere -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user