From becf3a68745a054126e9ea6ec752c0fc3b1d4098 Mon Sep 17 00:00:00 2001 From: Levin Li Date: Fri, 17 Feb 2023 19:35:02 +0800 Subject: [PATCH] Fix warnings --- .../space/celestia/mobilecelestia/search/SearchFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/space/celestia/mobilecelestia/search/SearchFragment.kt b/app/src/main/java/space/celestia/mobilecelestia/search/SearchFragment.kt index 365fdf99..fb41792b 100644 --- a/app/src/main/java/space/celestia/mobilecelestia/search/SearchFragment.kt +++ b/app/src/main/java/space/celestia/mobilecelestia/search/SearchFragment.kt @@ -139,13 +139,13 @@ class SearchFragment : NavigationFragment.SubFragment() { .launchIn(lifecycleScope) val weakSelf = WeakReference(this) - searchView.addTransitionListener { searchView, previousState, newState -> + searchView.addTransitionListener { _, _, newState -> val self = weakSelf.get() ?: return@addTransitionListener if (newState == SearchView.TransitionState.HIDING || newState == SearchView.TransitionState.HIDDEN) { self.searchBar.text = self.searchView.text } } - searchView.editText.setOnEditorActionListener { textView, actionId, keyEvent -> + searchView.editText.setOnEditorActionListener { _, actionId, _ -> val self = weakSelf.get() ?: return@setOnEditorActionListener false val searchKey = self.searchView.text if (actionId == EditorInfo.IME_ACTION_SEARCH) {