fix: won’t show dialog if skip all then selection list is empty
This commit is contained in:
parent
89a5f2e702
commit
cd016ab29e
1 changed files with 4 additions and 0 deletions
|
|
@ -92,6 +92,10 @@ class BulkFavoriteScreenModel(
|
|||
fun addFavoriteDuplicate(skipAllDuplicates: Boolean = false) {
|
||||
screenModelScope.launch {
|
||||
val mangaList = if (skipAllDuplicates) getNotDuplicateLibraryMangas() else state.value.selection
|
||||
if (mangaList.isEmpty()) {
|
||||
toggleSelectionMode()
|
||||
return@launch
|
||||
}
|
||||
val categories = getCategories()
|
||||
val defaultCategoryId = libraryPreferences.defaultCategory().get()
|
||||
val defaultCategory = categories.find { it.id == defaultCategoryId.toLong() }
|
||||
|
|
|
|||
Loading…
Reference in a new issue