Add last update time to Updates Tab (closes #5466)

Co-authored-by: datreesezcup <datreesezcup@users.noreply.github.com>
This commit is contained in:
arkon
2022-08-29 14:57:25 -04:00
parent 8a3a7418d0
commit 43c195e14a
6 changed files with 41 additions and 2 deletions
@@ -68,6 +68,7 @@ import logcat.LogPriority
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.io.File
import java.util.Date
import java.util.concurrent.CopyOnWriteArrayList
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicInteger
@@ -225,6 +226,11 @@ class LibraryUpdateService(
updateJob?.cancel()
ioScope?.cancel()
// If this is a chapter update; set the last update time to now
if (target == Target.CHAPTERS) {
preferences.libraryUpdateLastTimestamp().set(Date().time)
}
// Update favorite manga
val categoryId = intent.getLongExtra(KEY_CATEGORY, -1L)
addMangaToQueue(categoryId)