mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-11 03:28:56 +01:00
Move a few Dialogs to Compose (#7861)
* Move a few Dialogs to Compose - Separating dialogs that are not needed in the PR for the move to Compose on the Browse Source screen - ChangeMangaCategoriesDialog and AddDuplicateMangaDialog will be removed in the Browse Source screen PR * Review changes
This commit is contained in:
@@ -7,6 +7,7 @@ import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import eu.kanade.domain.category.model.Category
|
||||
import eu.kanade.tachiyomi.data.database.models.LibraryManga
|
||||
import eu.kanade.tachiyomi.ui.library.LibraryPresenter
|
||||
|
||||
@Stable
|
||||
interface LibraryState {
|
||||
@@ -16,6 +17,7 @@ interface LibraryState {
|
||||
val selection: List<LibraryManga>
|
||||
val selectionMode: Boolean
|
||||
var hasActiveFilters: Boolean
|
||||
var dialog: LibraryPresenter.Dialog?
|
||||
}
|
||||
|
||||
fun LibraryState(): LibraryState {
|
||||
@@ -29,4 +31,5 @@ class LibraryStateImpl : LibraryState {
|
||||
override var selection: List<LibraryManga> by mutableStateOf(emptyList())
|
||||
override val selectionMode: Boolean by derivedStateOf { selection.isNotEmpty() }
|
||||
override var hasActiveFilters: Boolean by mutableStateOf(false)
|
||||
override var dialog: LibraryPresenter.Dialog? by mutableStateOf(null)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user