From 5a73fd7cdb96a8ceb2b0c4ec9a15cf689759077a Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 13 Aug 2023 12:15:02 +0200 Subject: [PATCH] chore: trim search history entries before saving --- .../com/github/libretube/ui/fragments/SearchResultFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/SearchResultFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/SearchResultFragment.kt index 0389d18d9..286d88289 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/SearchResultFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/SearchResultFragment.kt @@ -152,7 +152,7 @@ class SearchResultFragment : Fragment() { PreferenceHelper.getBoolean(PreferenceKeys.SEARCH_HISTORY_TOGGLE, true) if (searchHistoryEnabled && query.isNotEmpty()) { lifecycleScope.launch(Dispatchers.IO) { - DatabaseHelper.addToSearchHistory(SearchHistoryItem(query)) + DatabaseHelper.addToSearchHistory(SearchHistoryItem(query.trim())) } } }