Support mass migration for selected library items (#2336)

This commit is contained in:
AntsyLich
2025-08-03 01:03:45 +06:00
committed by GitHub
parent e62cd0e816
commit 982ebcf777
7 changed files with 128 additions and 44 deletions

View File

@@ -48,6 +48,7 @@ import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.receiveAsFlow
import kotlinx.coroutines.launch
import mihon.feature.migration.config.MigrationConfigScreen
import tachiyomi.core.common.i18n.stringResource
import tachiyomi.core.common.util.lang.launchIO
import tachiyomi.domain.category.model.Category
@@ -149,6 +150,11 @@ data object LibraryTab : Tab {
onDownloadClicked = screenModel::performDownloadAction
.takeIf { state.selectedManga.fastAll { !it.isLocal() } },
onDeleteClicked = screenModel::openDeleteMangaDialog,
onMigrateClicked = {
val selection = state.selection
screenModel.clearSelection()
navigator.push(MigrationConfigScreen(selection))
},
)
},
snackbarHost = { SnackbarHost(hostState = snackbarHostState) },