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