Pārlūkot izejas kodu

Fix ReaderModel::password

cooperku_kdanmobile 4 gadi atpakaļ
vecāks
revīzija
db3a3092ed
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  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
     }