|
|
@ -135,11 +135,15 @@ object BookHelp { |
|
|
|
?.uri?.readText(App.INSTANCE) |
|
|
|
?.uri?.readText(App.INSTANCE) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return FileUtils.createFileIfNotExist( |
|
|
|
val path = FileUtils.getPath( |
|
|
|
File(downloadPath), |
|
|
|
File(downloadPath), |
|
|
|
"${bookChapterName(bookChapter)}.nb", |
|
|
|
"${bookChapterName(bookChapter)}.nb", |
|
|
|
subDirs = *arrayOf(cacheFolderName, bookFolderName(book)) |
|
|
|
subDirs = *arrayOf(cacheFolderName, bookFolderName(book)) |
|
|
|
).readText() |
|
|
|
) |
|
|
|
|
|
|
|
val file = File(path) |
|
|
|
|
|
|
|
if (file.exists()) { |
|
|
|
|
|
|
|
return file.readText() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return null |
|
|
|
return null |
|
|
|
} |
|
|
|
} |
|
|
|