pull/1303/head
gedoor 3 years ago
parent 612c25c406
commit c4ddc2b642
  1. 6
      app/src/main/java/io/legado/app/model/CacheBook.kt

@ -62,11 +62,11 @@ class CacheBook(var bookSource: BookSource, var book: Book) {
fun addLog(log: String?) { fun addLog(log: String?) {
log ?: return log ?: return
synchronized(this) { synchronized(logs) {
if (logs.size > 1000) { if (logs.size > 1000) {
logs.removeAt(0) logs.removeLastOrNull()
} }
logs.add(logTimeFormat.format(Date()) + " " + log) logs.add(0, logTimeFormat.format(Date()) + " " + log)
} }
} }

Loading…
Cancel
Save