Clean up PDFViewerActivity for consistency

This commit is contained in:
Ensar Sarajčić 2023-07-07 08:06:50 +02:00
parent 4d0a7121cc
commit 85559abbf4
1 changed files with 7 additions and 3 deletions

View File

@ -110,15 +110,19 @@ class PDFViewerActivity : SimpleActivity() {
.onTap { toggleFullScreen() }
.onError {
if (it is PdfPasswordException) {
// Already entered a password and it was wrong
// already entered a password and it was wrong
if (filePassword != null) {
showErrorToast(getString(R.string.invalid_password))
finish()
} else {
EnterPasswordDialog(
this,
callback = { password -> loadPdfViewer(uri, password) },
cancelCallback = { finish() }
callback = { password ->
loadPdfViewer(uri, password)
},
cancelCallback = {
finish()
}
)
}
} else {