Skip to content

Commit 7b9d42b

Browse files
committed
fix Search, properly handle non UTF characters
1 parent 185f1e6 commit 7b9d42b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ android {
5757
}
5858

5959
dependencies {
60-
implementation 'com.simplemobiletools:commons:5.29.20'
60+
implementation 'com.simplemobiletools:commons:5.30.10'
6161
implementation 'joda-time:joda-time:2.10.1'
6262
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
6363
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
64+
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
6465

6566
kapt "androidx.room:room-compiler:2.2.5"
6667
implementation "androidx.room:room-runtime:2.2.5"

app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
297297
val filtered = contactsIgnoringSearch.filter {
298298
getProperText(it.getNameToDisplay(), shouldNormalize).contains(text, true) ||
299299
getProperText(it.nickname, shouldNormalize).contains(text, true) ||
300-
it.phoneNumbers.any { (it.normalizedNumber ?: it.value).contains(text.normalizePhoneNumber(), true) } ||
300+
it.phoneNumbers.any {
301+
text.normalizePhoneNumber().isNotEmpty() && (it.normalizedNumber ?: it.value).contains(text.normalizePhoneNumber(), true)
302+
} ||
301303
it.emails.any { it.value.contains(text, true) } ||
302304
it.addresses.any { getProperText(it.value, shouldNormalize).contains(text, true) } ||
303305
it.IMs.any { it.value.contains(text, true) } ||

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.3.72'
4+
ext.kotlin_version = '1.4.10'
55

66
repositories {
77
google()

0 commit comments

Comments
 (0)