mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-20 05:50:03 +03:00
Format source
This commit is contained in:
parent
cf70916764
commit
c8a8e0f2da
2 changed files with 8 additions and 8 deletions
|
@ -106,7 +106,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
|
|
||||||
viewModel.observeViewEvents {
|
viewModel.observeViewEvents {
|
||||||
when (it) {
|
when (it) {
|
||||||
is VerificationBottomSheetViewEvents.Dismiss -> dismiss()
|
is VerificationBottomSheetViewEvents.Dismiss -> dismiss()
|
||||||
is VerificationBottomSheetViewEvents.AccessSecretStore -> {
|
is VerificationBottomSheetViewEvents.AccessSecretStore -> {
|
||||||
secretStartForActivityResult.launch(SharedSecureStorageActivity.newIntent(
|
secretStartForActivityResult.launch(SharedSecureStorageActivity.newIntent(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
|
@ -115,7 +115,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
SharedSecureStorageActivity.DEFAULT_RESULT_KEYSTORE_ALIAS
|
SharedSecureStorageActivity.DEFAULT_RESULT_KEYSTORE_ALIAS
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
is VerificationBottomSheetViewEvents.ModalError -> {
|
is VerificationBottomSheetViewEvents.ModalError -> {
|
||||||
AlertDialog.Builder(requireContext())
|
AlertDialog.Builder(requireContext())
|
||||||
.setTitle(getString(R.string.dialog_title_error))
|
.setTitle(getString(R.string.dialog_title_error))
|
||||||
.setMessage(it.errorMessage)
|
.setMessage(it.errorMessage)
|
||||||
|
@ -124,7 +124,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
.show()
|
.show()
|
||||||
Unit
|
Unit
|
||||||
}
|
}
|
||||||
VerificationBottomSheetViewEvents.GoToSettings -> {
|
VerificationBottomSheetViewEvents.GoToSettings -> {
|
||||||
dismiss()
|
dismiss()
|
||||||
(activity as? VectorBaseActivity)?.navigator?.openSettings(requireContext(), VectorSettingsActivity.EXTRA_DIRECT_ACCESS_SECURITY_PRIVACY)
|
(activity as? VectorBaseActivity)?.navigator?.openSettings(requireContext(), VectorSettingsActivity.EXTRA_DIRECT_ACCESS_SECURITY_PRIVACY)
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
state.pendingRequest.invoke()?.transactionId ?: state.transactionId))
|
state.pendingRequest.invoke()?.transactionId ?: state.transactionId))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
is VerificationTxState.Verified -> {
|
is VerificationTxState.Verified -> {
|
||||||
showFragment(VerificationConclusionFragment::class, Bundle().apply {
|
showFragment(VerificationConclusionFragment::class, Bundle().apply {
|
||||||
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
|
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
|
||||||
})
|
})
|
||||||
|
@ -264,7 +264,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
when (state.qrTransactionState) {
|
when (state.qrTransactionState) {
|
||||||
is VerificationTxState.QrScannedByOther -> {
|
is VerificationTxState.QrScannedByOther -> {
|
||||||
showFragment(VerificationQrScannedByOtherFragment::class, Bundle())
|
showFragment(VerificationQrScannedByOtherFragment::class, Bundle())
|
||||||
return@withState
|
return@withState
|
||||||
}
|
}
|
||||||
|
@ -278,13 +278,13 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
})
|
})
|
||||||
return@withState
|
return@withState
|
||||||
}
|
}
|
||||||
is VerificationTxState.Verified -> {
|
is VerificationTxState.Verified -> {
|
||||||
showFragment(VerificationConclusionFragment::class, Bundle().apply {
|
showFragment(VerificationConclusionFragment::class, Bundle().apply {
|
||||||
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
|
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
|
||||||
})
|
})
|
||||||
return@withState
|
return@withState
|
||||||
}
|
}
|
||||||
is VerificationTxState.Cancelled -> {
|
is VerificationTxState.Cancelled -> {
|
||||||
showFragment(VerificationConclusionFragment::class, Bundle().apply {
|
showFragment(VerificationConclusionFragment::class, Bundle().apply {
|
||||||
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(false, state.qrTransactionState.cancelCode.value, state.isMe))
|
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(false, state.qrTransactionState.cancelCode.value, state.isMe))
|
||||||
})
|
})
|
||||||
|
|
|
@ -482,7 +482,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
when (tx) {
|
when (tx) {
|
||||||
is SasVerificationTransaction -> {
|
is SasVerificationTransaction -> {
|
||||||
if (tx.transactionId == (state.pendingRequest.invoke()?.transactionId ?: state.transactionId)) {
|
if (tx.transactionId == (state.pendingRequest.invoke()?.transactionId ?: state.transactionId)) {
|
||||||
// A SAS tx has been started following this request
|
// A SAS tx has been started following this request
|
||||||
setState {
|
setState {
|
||||||
|
|
Loading…
Add table
Reference in a new issue