Przeglądaj źródła

Fix ReaderModel::password

cooperku_kdanmobile 4 lat temu
rodzic
commit
db3a3092ed

+ 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
     }