aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-07-17 22:22:12 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2022-07-17 22:38:27 +0530
commite1e5d13a6a9edc5ba16ea97cfe6e72cbb5976626 (patch)
treeef50e9853a98c52a5a87fb2a37a118cb2619dbd1 /app/src
parent4ed98c9fda6e3121e5ba9d9d4b001e9512240fd0 (diff)
Mark key import dialogs as non-cancellable
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt
index 4ea1d0b5..4c9060f7 100644
--- a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt
+++ b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyImportActivity.kt
@@ -82,7 +82,7 @@ class PGPKeyImportActivity : AppCompatActivity() {
.setTitle(getString(R.string.pgp_key_import_succeeded))
.setMessage(getString(R.string.pgp_key_import_succeeded_message, tryGetId(key)))
.setPositiveButton(android.R.string.ok) { _, _ -> finish() }
- .setOnCancelListener { finish() }
+ .setCancelable(false)
.show()
}
is Err<Throwable> -> {
@@ -94,14 +94,14 @@ class PGPKeyImportActivity : AppCompatActivity() {
handleImportResult(runCatching { importKey(lastBytes!!, replace = true) })
}
.setNegativeButton(R.string.dialog_no) { _, _ -> finish() }
- .setOnCancelListener { finish() }
+ .setCancelable(false)
.show()
} else {
MaterialAlertDialogBuilder(this)
.setTitle(getString(R.string.pgp_key_import_failed))
.setMessage(result.error.message)
.setPositiveButton(android.R.string.ok) { _, _ -> finish() }
- .setOnCancelListener { finish() }
+ .setCancelable(false)
.show()
}
}