mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-26 03:50:40 +01:00
@@ -0,0 +1,17 @@
|
||||
package tachiyomi.domain.chapter.interactor
|
||||
|
||||
import tachiyomi.domain.chapter.model.Chapter
|
||||
import tachiyomi.domain.chapter.repository.ChapterRepository
|
||||
|
||||
class GetChapterByUrlAndMangaId(
|
||||
private val chapterRepository: ChapterRepository,
|
||||
) {
|
||||
|
||||
suspend fun await(url: String, sourceId: Long): Chapter? {
|
||||
return try {
|
||||
chapterRepository.getChapterByUrlAndMangaId(url, sourceId)
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,8 +50,6 @@ class LibraryPreferences(
|
||||
|
||||
fun autoUpdateMetadata() = preferenceStore.getBoolean("auto_update_metadata", false)
|
||||
|
||||
fun autoUpdateTrackers() = preferenceStore.getBoolean("auto_update_trackers", false)
|
||||
|
||||
fun showContinueReadingButton() = preferenceStore.getBoolean(
|
||||
"display_continue_reading_button",
|
||||
false,
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package tachiyomi.domain.manga.interactor
|
||||
|
||||
import tachiyomi.domain.manga.model.Manga
|
||||
import tachiyomi.domain.manga.repository.MangaRepository
|
||||
|
||||
class GetMangaByUrlAndSourceId(
|
||||
private val mangaRepository: MangaRepository,
|
||||
) {
|
||||
suspend fun awaitManga(url: String, sourceId: Long): Manga? {
|
||||
return mangaRepository.getMangaByUrlAndSourceId(url, sourceId)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user