First test if resultCode == Activity.RESULT_OK
This commit is contained in:
parent
b8c350488b
commit
a6cf2b0685
@ -322,9 +322,11 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == REQUEST_CODE_SAVE_MEGOLM_EXPORT) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
when (requestCode) {
|
||||
REQUEST_CODE_SAVE_MEGOLM_EXPORT -> {
|
||||
val uri = data?.data
|
||||
if (resultCode == Activity.RESULT_OK && uri != null) {
|
||||
if (uri != null) {
|
||||
activity?.let { activity ->
|
||||
ExportKeysDialog().show(activity, object : ExportKeysDialog.ExportKeyDialogListener {
|
||||
override fun onPassphrase(passphrase: String) {
|
||||
@ -352,14 +354,16 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if (requestCode == PinActivity.PIN_REQUEST_CODE) {
|
||||
}
|
||||
PinActivity.PIN_REQUEST_CODE -> {
|
||||
doOpenPinCodePreferenceScreen()
|
||||
} else if (requestCode == REQUEST_E2E_FILE_REQUEST_CODE) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
}
|
||||
REQUEST_E2E_FILE_REQUEST_CODE -> {
|
||||
importKeys(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun openPinCodePreferenceScreen() {
|
||||
lifecycleScope.launchWhenResumed {
|
||||
|
Loading…
x
Reference in New Issue
Block a user