Avoid showing duplicate entry dialog for same entry

Fixes #9772

(cherry picked from commit fd30c0adcdfc0efc0aae9e5401843439f2622070)
This commit is contained in:
arkon
2023-07-29 12:07:13 -04:00
committed by Jobobby04
parent cc297da44a
commit 9760cb101d
6 changed files with 9 additions and 9 deletions
@@ -7,7 +7,7 @@ class GetDuplicateLibraryManga(
private val mangaRepository: MangaRepository,
) {
suspend fun await(title: String): Manga? {
return mangaRepository.getDuplicateLibraryManga(title.lowercase())
suspend fun await(manga: Manga): List<Manga> {
return mangaRepository.getDuplicateLibraryManga(manga.id, manga.title.lowercase())
}
}
@@ -23,7 +23,7 @@ interface MangaRepository {
fun getFavoritesBySourceId(sourceId: Long): Flow<List<Manga>>
suspend fun getDuplicateLibraryManga(title: String): Manga?
suspend fun getDuplicateLibraryManga(id: Long, title: String): List<Manga>
suspend fun resetViewerFlags(): Boolean