feat: improve search by normalizing string (#283)

* feat: improve search by normalizing string

* docs(changelog): correct link reference

---------

Co-authored-by: Naveen Singh <36371707+naveensingh@users.noreply.github.com>
This commit is contained in:
Florian Bernard
2025-11-23 11:20:40 +01:00
committed by GitHub
parent fd5af4becc
commit b2888dfa40
2 changed files with 6 additions and 1 deletions

View File

@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed
- Search now ignores accents and diacritics ([#282])
## [1.5.0] - 2025-10-29
### Changed
@@ -89,6 +91,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#182]: https://github.com/FossifyOrg/Launcher/issues/182
[#230]: https://github.com/FossifyOrg/Launcher/issues/230
[#234]: https://github.com/FossifyOrg/Launcher/issues/234
[#282]: https://github.com/FossifyOrg/Launcher/issues/282
[Unreleased]: https://github.com/FossifyOrg/Launcher/compare/1.5.0...HEAD
[1.5.0]: https://github.com/FossifyOrg/Launcher/compare/1.4.0...1.5.0

View File

@@ -200,7 +200,9 @@ class AllAppsFragment(
binding.searchBar.onSearchTextChangedListener = { query ->
val filtered =
launchers.filter { query.isEmpty() || it.title.contains(query, ignoreCase = true) }
launchers.filter {
query.isEmpty() || it.title.normalizeString().contains(query.normalizeString(), ignoreCase = true)
}
getAdapter()?.submitList(filtered) {
showNoResultsPlaceholderIfNeeded()
}