Revert "Show no pinned sources message when attempting to migrate/search"

This reverts commit 6bb3070c57.

This doesn't quite work correctly, so reverting for now.
We'll have to have more robust states or something to deal with this in the
future.
This commit is contained in:
arkon
2023-02-05 10:20:12 -05:00
parent 75e23299b4
commit 29aee68ec7
4 changed files with 2 additions and 35 deletions

View File

@@ -22,11 +22,7 @@ class MigrateSearchScreenModel(
private val sourcePreferences: SourcePreferences = Injekt.get(),
private val sourceManager: SourceManager = Injekt.get(),
private val getManga: GetManga = Injekt.get(),
) : SearchScreenModel<MigrateSearchState>(
MigrateSearchState(
isPinnedOnly = sourcePreferences.searchPinnedSourcesOnly().get(),
),
) {
) : SearchScreenModel<MigrateSearchState>(MigrateSearchState()) {
init {
extensionFilter = initialExtensionFilter
@@ -88,7 +84,6 @@ data class MigrateSearchState(
val manga: Manga? = null,
val searchQuery: String? = null,
val items: Map<CatalogueSource, SearchItemResult> = emptyMap(),
val isPinnedOnly: Boolean,
val dialog: MigrateSearchDialog? = null,
) {

View File

@@ -15,12 +15,7 @@ class GlobalSearchScreenModel(
preferences: BasePreferences = Injekt.get(),
private val sourcePreferences: SourcePreferences = Injekt.get(),
private val sourceManager: SourceManager = Injekt.get(),
) : SearchScreenModel<GlobalSearchState>(
GlobalSearchState(
searchQuery = initialQuery,
isPinnedOnly = sourcePreferences.searchPinnedSourcesOnly().get(),
),
) {
) : SearchScreenModel<GlobalSearchState>(GlobalSearchState(searchQuery = initialQuery)) {
val incognitoMode = preferences.incognitoMode()
val lastUsedSourceId = sourcePreferences.lastUsedSource()
@@ -64,7 +59,6 @@ class GlobalSearchScreenModel(
data class GlobalSearchState(
val searchQuery: String? = null,
val items: Map<CatalogueSource, SearchItemResult> = emptyMap(),
val isPinnedOnly: Boolean,
) {
val progress: Int = items.count { it.value !is SearchItemResult.Loading }