mirror of
https://github.com/Corewala/Buran
synced 2025-01-02 21:24:19 +00:00
Check for certificate before offering continue button
This commit is contained in:
parent
ee664058bc
commit
0981c23e37
1 changed files with 15 additions and 6 deletions
|
@ -402,14 +402,23 @@ class GemActivity : AppCompatActivity() {
|
|||
|
||||
is GemState.ClientCertRequired -> runOnUiThread {
|
||||
loadingView(false)
|
||||
AlertDialog.Builder(this, R.style.AppDialogTheme)
|
||||
val builder = AlertDialog.Builder(this, R.style.AppDialogTheme)
|
||||
builder
|
||||
.setTitle(getString(R.string.client_certificate_required))
|
||||
.setMessage(state.header.meta)
|
||||
|
||||
if(prefs.getString(Buran.PREF_KEY_CLIENT_CERT_HUMAN_READABLE, null) != null){
|
||||
builder
|
||||
.setPositiveButton(getString(R.string.use_client_certificate)) { _, _ ->
|
||||
model.request(state.uri.toString(), true)
|
||||
}
|
||||
.setNegativeButton(getString(R.string.cancel)) { _, _ -> }
|
||||
.show()
|
||||
}else{
|
||||
builder
|
||||
.setNegativeButton(getString(R.string.close)) { _, _ -> }
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
||||
is GemState.Requesting -> loadingView(true)
|
||||
|
|
Loading…
Reference in a new issue