From f14ff670226d9e1c0c3344c81643148eb024d014 Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:00:19 +0800 Subject: [PATCH] fix search message --- .../kotlin/ac/mdiq/podcini/ui/fragment/OnlineSearchFragment.kt | 2 +- .../main/kotlin/ac/mdiq/podcini/ui/fragment/SearchFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/OnlineSearchFragment.kt b/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/OnlineSearchFragment.kt index a600ef9e..cdd1e5e4 100644 --- a/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/OnlineSearchFragment.kt +++ b/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/OnlineSearchFragment.kt @@ -145,7 +145,7 @@ class OnlineSearchFragment : Fragment() { progressBar.visibility = View.GONE adapter?.clear() handleSearchResults() - txtvEmpty.text = getString(R.string.no_results_for_query) + query + txtvEmpty.text = getString(R.string.no_results_for_query, query) } } catch (e: Exception) { handleSearchError(e, query) } } diff --git a/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/SearchFragment.kt b/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/SearchFragment.kt index d346d6db..60f1f2b0 100644 --- a/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/SearchFragment.kt +++ b/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/SearchFragment.kt @@ -310,7 +310,7 @@ import java.lang.ref.WeakReference if (results.second != null) adapterFeeds.updateData(results.second!!) } else adapterFeeds.updateData(emptyList()) if (searchView.query.toString().isEmpty()) emptyViewHandler.setMessage(R.string.type_to_search) - else emptyViewHandler.setMessage(getString(R.string.no_results_for_query) + searchView.query) + else emptyViewHandler.setMessage(getString(R.string.no_results_for_query, searchView.query)) } } catch (e: Throwable) { Log.e(TAG, Log.getStackTraceString(e))