mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-22 02:58:55 +02:00
Set start date when tracker is bound if any chapters are already read
Closes #6734
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package tachiyomi.domain.history.interactor
|
||||
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import tachiyomi.domain.history.model.History
|
||||
import tachiyomi.domain.history.model.HistoryWithRelations
|
||||
import tachiyomi.domain.history.repository.HistoryRepository
|
||||
|
||||
@@ -8,6 +9,10 @@ class GetHistory(
|
||||
private val repository: HistoryRepository,
|
||||
) {
|
||||
|
||||
suspend fun await(mangaId: Long): List<History> {
|
||||
return repository.getHistoryByMangaId(mangaId)
|
||||
}
|
||||
|
||||
fun subscribe(query: String): Flow<List<HistoryWithRelations>> {
|
||||
return repository.getHistory(query)
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package tachiyomi.domain.history.repository
|
||||
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import tachiyomi.domain.history.model.History
|
||||
import tachiyomi.domain.history.model.HistoryUpdate
|
||||
import tachiyomi.domain.history.model.HistoryWithRelations
|
||||
|
||||
@@ -12,6 +13,8 @@ interface HistoryRepository {
|
||||
|
||||
suspend fun getTotalReadDuration(): Long
|
||||
|
||||
suspend fun getHistoryByMangaId(mangaId: Long): List<History>
|
||||
|
||||
suspend fun resetHistory(historyId: Long)
|
||||
|
||||
suspend fun resetHistoryByMangaId(mangaId: Long)
|
||||
|
Reference in New Issue
Block a user