Don't exclude same source when checking for duplicate entries
Closes #8870
This commit is contained in:
@@ -169,7 +169,6 @@ class MangaScreen(
|
||||
onDismissRequest = onDismissRequest,
|
||||
onConfirm = { screenModel.toggleFavorite(onRemoved = {}, checkDuplicate = false) },
|
||||
onOpenManga = { navigator.push(MangaScreen(dialog.duplicate.id)) },
|
||||
duplicateFrom = screenModel.getSourceOrStub(dialog.duplicate),
|
||||
)
|
||||
MangaInfoScreenModel.Dialog.SettingsSheet -> ChapterSettingsDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
|
||||
@@ -82,7 +82,6 @@ class MangaInfoScreenModel(
|
||||
private val libraryPreferences: LibraryPreferences = Injekt.get(),
|
||||
private val uiPreferences: UiPreferences = Injekt.get(),
|
||||
private val trackManager: TrackManager = Injekt.get(),
|
||||
private val sourceManager: SourceManager = Injekt.get(),
|
||||
private val downloadManager: DownloadManager = Injekt.get(),
|
||||
private val downloadCache: DownloadCache = Injekt.get(),
|
||||
private val getMangaAndChapters: GetMangaWithChapters = Injekt.get(),
|
||||
@@ -272,7 +271,7 @@ class MangaInfoScreenModel(
|
||||
// Add to library
|
||||
// First, check if duplicate exists if callback is provided
|
||||
if (checkDuplicate) {
|
||||
val duplicate = getDuplicateLibraryManga.await(manga.title, manga.source)
|
||||
val duplicate = getDuplicateLibraryManga.await(manga.title)
|
||||
|
||||
if (duplicate != null) {
|
||||
mutableState.update { state ->
|
||||
@@ -926,10 +925,6 @@ class MangaInfoScreenModel(
|
||||
|
||||
// Track sheet - end
|
||||
|
||||
fun getSourceOrStub(manga: Manga): Source {
|
||||
return sourceManager.getOrStub(manga.source)
|
||||
}
|
||||
|
||||
sealed class Dialog {
|
||||
data class ChangeCategory(val manga: Manga, val initialSelection: List<CheckboxState<Category>>) : Dialog()
|
||||
data class DeleteChapters(val chapters: List<Chapter>) : Dialog()
|
||||
|
||||
Reference in New Issue
Block a user