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:
parent
5acde17efb
commit
1d17251341
1 changed files with 6 additions and 2 deletions
|
|
@ -169,11 +169,11 @@ class SettingsActivity : AppCompatActivity() {
|
|||
finish()
|
||||
}
|
||||
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()
|
||||
}
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
|
@ -287,6 +287,10 @@ class SettingsActivity : AppCompatActivity() {
|
|||
progressDialog = AlertDialog.Builder(this)
|
||||
.setTitle(title)
|
||||
.setView(view)
|
||||
.setNegativeButton("Annuleren") { _, _ ->
|
||||
flasher?.cancel()
|
||||
cleanupAction()
|
||||
}
|
||||
.setCancelable(false)
|
||||
.show()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue