浏览代码

Fix ReaderModel::password

cooperku_kdanmobile 4 年之前
父节点
当前提交
db3a3092ed
共有 1 个文件被更改,包括 4 次插入1 次删除
  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
     }