Explorar o código

Merge branch '138-fixEncryptMenuItemOnAndroid29' into 'master'

Resolve "[Android 29] 開啟有密碼的PDF時,選單仍出現「加密」選項"

See merge request kdanandroid/pdf/pdfreaderreadermodule!69
Wayne Huang %!s(int64=4) %!d(string=hai) anos
pai
achega
1ff1f8147d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/main/java/com/kdanmobile/reader/ReaderActivity.kt

+ 1 - 1
src/main/java/com/kdanmobile/reader/ReaderActivity.kt

@@ -311,7 +311,7 @@ abstract class ReaderActivity :
         }
         menu?.apply {
             val isPdf = isPdf()
-            when (password.isEmpty()) {
+            when (!isPasswordProtected) {
                 true -> {
                     findItem(R.id.item_reader_more_encrypt)?.isVisible = isPdf
                     findItem(R.id.item_reader_more_decrypt)?.isVisible = false