Add retry hint to key exchange errors and cancel button to flash dialog

1. Append 'probeer het opnieuw' to key exchange error toasts.
2. Add 'Annuleren' button to flash progress dialog that calls
   flasher.cancel() and cleanupAction().
This commit is contained in:
eddy 2026-07-26 17:20:49 +02:00
commit 1d17251341

View file

@ -169,11 +169,11 @@ class SettingsActivity : AppCompatActivity() {
finish() finish()
} }
is KeyResult.Error -> { is KeyResult.Error -> {
Toast.makeText(this, result.message, Toast.LENGTH_LONG).show() Toast.makeText(this, "${result.message} — probeer het opnieuw", Toast.LENGTH_LONG).show()
cleanupAction() cleanupAction()
} }
null -> { null -> {
Toast.makeText(this, "Sleutel niet gevonden", Toast.LENGTH_SHORT).show() Toast.makeText(this, "Sleutel niet gevonden — probeer het opnieuw", Toast.LENGTH_SHORT).show()
cleanupAction() cleanupAction()
} }
} }
@ -287,6 +287,10 @@ class SettingsActivity : AppCompatActivity() {
progressDialog = AlertDialog.Builder(this) progressDialog = AlertDialog.Builder(this)
.setTitle(title) .setTitle(title)
.setView(view) .setView(view)
.setNegativeButton("Annuleren") { _, _ ->
flasher?.cancel()
cleanupAction()
}
.setCancelable(false) .setCancelable(false)
.show() .show()
} }