Skip to content

Commit

Permalink
Merge pull request #4446 from Bnyro/master
Browse files Browse the repository at this point in the history
chore: trim search history entries before saving
  • Loading branch information
Bnyro authored Aug 13, 2023
2 parents c28dc5d + 5a73fd7 commit e398bb6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}
}
}
Expand Down

0 comments on commit e398bb6

Please sign in to comment.