mirror of
https://github.com/FossifyOrg/Launcher.git
synced 2025-12-23 23:58:13 -05:00
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:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user