Minor edits
(cherry picked from commit d4ffb09a8bde73656f460636f56c82b7ae9c280e) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt
This commit is contained in:
parent
8435be1b1f
commit
b1c9a204c1
@ -32,7 +32,7 @@ import eu.kanade.tachiyomi.ui.browse.source.latest.LatestUpdatesController
|
|||||||
import eu.kanade.tachiyomi.ui.setting.SettingsSourcesController
|
import eu.kanade.tachiyomi.ui.setting.SettingsSourcesController
|
||||||
import exh.ui.smartsearch.SmartSearchController
|
import exh.ui.smartsearch.SmartSearchController
|
||||||
import kotlinx.android.parcel.Parcelize
|
import kotlinx.android.parcel.Parcelize
|
||||||
import kotlinx.coroutines.flow.filter
|
import kotlinx.coroutines.flow.filterIsInstance
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
import reactivecircus.flowbinding.appcompat.QueryTextEvent
|
import reactivecircus.flowbinding.appcompat.QueryTextEvent
|
||||||
@ -236,7 +236,7 @@ class SourceController(bundle: Bundle? = null) :
|
|||||||
|
|
||||||
// Create query listener which opens the global search view.
|
// Create query listener which opens the global search view.
|
||||||
searchView.queryTextEvents()
|
searchView.queryTextEvents()
|
||||||
.filter { it is QueryTextEvent.QuerySubmitted }
|
.filterIsInstance<QueryTextEvent.QuerySubmitted>()
|
||||||
.onEach { performGlobalSearch(it.queryText.toString()) }
|
.onEach { performGlobalSearch(it.queryText.toString()) }
|
||||||
.launchIn(scope)
|
.launchIn(scope)
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ import eu.kanade.tachiyomi.widget.EmptyView
|
|||||||
import exh.EXHSavedSearch
|
import exh.EXHSavedSearch
|
||||||
import kotlinx.android.parcel.Parcelize
|
import kotlinx.android.parcel.Parcelize
|
||||||
import kotlinx.coroutines.flow.filter
|
import kotlinx.coroutines.flow.filter
|
||||||
|
import kotlinx.coroutines.flow.filterIsInstance
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
import reactivecircus.flowbinding.appcompat.QueryTextEvent
|
import reactivecircus.flowbinding.appcompat.QueryTextEvent
|
||||||
@ -384,7 +385,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||||||
|
|
||||||
searchView.queryTextEvents()
|
searchView.queryTextEvents()
|
||||||
.filter { router.backstack.lastOrNull()?.controller() == this@BrowseSourceController }
|
.filter { router.backstack.lastOrNull()?.controller() == this@BrowseSourceController }
|
||||||
.filter { it is QueryTextEvent.QuerySubmitted }
|
.filterIsInstance<QueryTextEvent.QuerySubmitted>()
|
||||||
.onEach { searchWithQuery(it.queryText.toString()) }
|
.onEach { searchWithQuery(it.queryText.toString()) }
|
||||||
.launchIn(scope)
|
.launchIn(scope)
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
|||||||
import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceController
|
import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceController
|
||||||
import eu.kanade.tachiyomi.ui.manga.MangaAllInOneController
|
import eu.kanade.tachiyomi.ui.manga.MangaAllInOneController
|
||||||
import eu.kanade.tachiyomi.ui.manga.MangaController
|
import eu.kanade.tachiyomi.ui.manga.MangaController
|
||||||
import kotlinx.coroutines.flow.filter
|
import kotlinx.coroutines.flow.filterIsInstance
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
import reactivecircus.flowbinding.appcompat.QueryTextEvent
|
import reactivecircus.flowbinding.appcompat.QueryTextEvent
|
||||||
@ -129,7 +129,7 @@ open class GlobalSearchController(
|
|||||||
})
|
})
|
||||||
|
|
||||||
searchView.queryTextEvents()
|
searchView.queryTextEvents()
|
||||||
.filter { it is QueryTextEvent.QuerySubmitted }
|
.filterIsInstance<QueryTextEvent.QuerySubmitted>()
|
||||||
.onEach {
|
.onEach {
|
||||||
presenter.search(it.queryText.toString())
|
presenter.search(it.queryText.toString())
|
||||||
searchItem.collapseActionView()
|
searchItem.collapseActionView()
|
||||||
|
@ -167,7 +167,7 @@ class HistoryPresenter : BasePresenter<HistoryController>() {
|
|||||||
}
|
}
|
||||||
Manga.SORTING_UPLOAD_DATE -> {
|
Manga.SORTING_UPLOAD_DATE -> {
|
||||||
chapters.drop(currChapterIndex + 1)
|
chapters.drop(currChapterIndex + 1)
|
||||||
.firstOrNull { it.date_upload >= chapter.date_upload}
|
.firstOrNull { it.date_upload >= chapter.date_upload }
|
||||||
}
|
}
|
||||||
else -> throw NotImplementedError("Unknown sorting method")
|
else -> throw NotImplementedError("Unknown sorting method")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user