chore: trim search history entries before saving

This commit is contained in:
Bnyro 2023-08-13 12:15:02 +02:00
parent f36622b3bb
commit 5a73fd7cdb

View File

@ -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()))
}
}
}