Explorar o código

Fix ReaderModel::password

cooperku_kdanmobile %!s(int64=4) %!d(string=hai) anos
pai
achega
db3a3092ed
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/main/java/com/kdanmobile/reader/ReaderModel.kt

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

@@ -43,7 +43,10 @@ class ReaderModel {
 
         this.kmpdfFactory = kmpdfFactory
         this.filename = filename
-        this.password = password
+        this.password = when (kmpdfFactory?.needPassWord()) {
+            false -> ""
+            else -> password
+        }
         this.isInitialized = true
     }