mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-06 01:20:29 +05:30
chore: trim search history entries before saving
This commit is contained in:
parent
f36622b3bb
commit
5a73fd7cdb
@ -152,7 +152,7 @@ class SearchResultFragment : Fragment() {
|
|||||||
PreferenceHelper.getBoolean(PreferenceKeys.SEARCH_HISTORY_TOGGLE, true)
|
PreferenceHelper.getBoolean(PreferenceKeys.SEARCH_HISTORY_TOGGLE, true)
|
||||||
if (searchHistoryEnabled && query.isNotEmpty()) {
|
if (searchHistoryEnabled && query.isNotEmpty()) {
|
||||||
lifecycleScope.launch(Dispatchers.IO) {
|
lifecycleScope.launch(Dispatchers.IO) {
|
||||||
DatabaseHelper.addToSearchHistory(SearchHistoryItem(query))
|
DatabaseHelper.addToSearchHistory(SearchHistoryItem(query.trim()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user