mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 18:47:51 +02:00
Set start date when tracker is bound if any chapters are already read
Closes #6734
This commit is contained in:
@ -4,6 +4,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
import logcat.LogPriority
|
||||
import tachiyomi.core.util.system.logcat
|
||||
import tachiyomi.data.DatabaseHandler
|
||||
import tachiyomi.domain.history.model.History
|
||||
import tachiyomi.domain.history.model.HistoryUpdate
|
||||
import tachiyomi.domain.history.model.HistoryWithRelations
|
||||
import tachiyomi.domain.history.repository.HistoryRepository
|
||||
@ -28,6 +29,10 @@ class HistoryRepositoryImpl(
|
||||
return handler.awaitOne { historyQueries.getReadDuration() }
|
||||
}
|
||||
|
||||
override suspend fun getHistoryByMangaId(mangaId: Long): List<History> {
|
||||
return handler.awaitList { historyQueries.getHistoryByMangaId(mangaId, historyMapper) }
|
||||
}
|
||||
|
||||
override suspend fun resetHistory(historyId: Long) {
|
||||
try {
|
||||
handler.await { historyQueries.resetHistoryById(historyId) }
|
||||
|
Reference in New Issue
Block a user