Avoid showing duplicate entry dialog for same entry

Fixes #9772
This commit is contained in:
arkon
2023-07-29 12:07:13 -04:00
parent 3ad4f1114a
commit fd30c0adcd
6 changed files with 9 additions and 9 deletions

View File

@@ -48,9 +48,9 @@ class MangaRepositoryImpl(
return handler.subscribeToList { mangasQueries.getFavoriteBySourceId(sourceId, mangaMapper) }
}
override suspend fun getDuplicateLibraryManga(title: String): Manga? {
return handler.awaitOneOrNull {
mangasQueries.getDuplicateLibraryManga(title, mangaMapper)
override suspend fun getDuplicateLibraryManga(id: Long, title: String): List<Manga> {
return handler.awaitList {
mangasQueries.getDuplicateLibraryManga(title, id, mangaMapper)
}
}

View File

@@ -92,7 +92,7 @@ SELECT *
FROM mangas
WHERE favorite = 1
AND LOWER(title) = :title
LIMIT 1;
AND _id != :id;
resetViewerFlags:
UPDATE mangas