mirror of
https://github.com/FossifyOrg/Contacts.git
synced 2025-12-23 23:59:46 -05:00
fix: don't limit search to 32bit ints (#378)
* fix: don't limit search to 32bit ints This is a quick fix. Will do a proper rewrite later. Refs: https://github.com/FossifyOrg/General-Discussion/issues/718 * docs: update changelog
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]
|
||||
### Fixed
|
||||
- Fixed search not matching full phone numbers
|
||||
|
||||
## [1.2.5] - 2025-09-09
|
||||
### Changed
|
||||
|
||||
@@ -315,7 +315,7 @@ abstract class MyViewPagerFragment<Binding : MyViewPagerFragment.InnerBinding>(c
|
||||
val filtered = contactsIgnoringSearch.filter {
|
||||
getProperText(it.getNameToDisplay(), shouldNormalize).contains(fixedText, true) ||
|
||||
getProperText(it.nickname, shouldNormalize).contains(fixedText, true) ||
|
||||
(fixedText.toIntOrNull() != null && it.phoneNumbers.any {
|
||||
(fixedText.toLongOrNull() != null && it.phoneNumbers.any {
|
||||
fixedText.normalizePhoneNumber().isNotEmpty() && it.normalizedNumber.contains(fixedText.normalizePhoneNumber(), true)
|
||||
}) ||
|
||||
it.emails.any { it.value.contains(fixedText, true) } ||
|
||||
@@ -339,7 +339,7 @@ abstract class MyViewPagerFragment<Binding : MyViewPagerFragment.InnerBinding>(c
|
||||
}
|
||||
|
||||
innerBinding.fragmentPlaceholder.beVisibleIf(filtered.isEmpty())
|
||||
(adapter as? ContactsAdapter)?.updateItems(filtered, fixedText.normalizeString())
|
||||
adapter.updateItems(filtered, fixedText.normalizeString())
|
||||
setupLetterFastscroller(filtered)
|
||||
} else if (adapter is GroupsAdapter) {
|
||||
val filtered = groupsIgnoringSearch.filter {
|
||||
@@ -351,7 +351,7 @@ abstract class MyViewPagerFragment<Binding : MyViewPagerFragment.InnerBinding>(c
|
||||
}
|
||||
|
||||
innerBinding.fragmentPlaceholder.beVisibleIf(filtered.isEmpty())
|
||||
(adapter as? GroupsAdapter)?.updateItems(filtered, text)
|
||||
adapter.updateItems(filtered, text)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user