mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
20305b5ff3
commit
afa658acfa
@ -19,7 +19,6 @@ class UmdFile(var book: Book) {
|
|||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
private fun getUFile(book: Book): UmdFile {
|
private fun getUFile(book: Book): UmdFile {
|
||||||
|
|
||||||
if (uFile == null || uFile?.book?.bookUrl != book.bookUrl) {
|
if (uFile == null || uFile?.book?.bookUrl != book.bookUrl) {
|
||||||
uFile = UmdFile(book)
|
uFile = UmdFile(book)
|
||||||
return uFile!!
|
return uFile!!
|
||||||
@ -76,7 +75,6 @@ class UmdFile(var book: Book) {
|
|||||||
}
|
}
|
||||||
if (!File(book.coverUrl!!).exists()) {
|
if (!File(book.coverUrl!!).exists()) {
|
||||||
FileUtils.writeBytes(book.coverUrl!!, it.cover.coverData)
|
FileUtils.writeBytes(book.coverUrl!!, it.cover.coverData)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
Loading…
Reference in New Issue
Block a user