From a87fb2e5ca2e38f45ee0ac42a22ff387fa3918f3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 3 Jan 2022 20:24:59 +0100 Subject: [PATCH] fix #764, fetch nicknames on the main screen too to make it searchable --- .../contacts/pro/helpers/ContactsHelper.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt index 59795654..20a06f43 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt @@ -258,6 +258,13 @@ class ContactsHelper(val context: Context) { contacts[key]?.notes = notes.valueAt(i) } + val nicknames = getNicknames() + size = nicknames.size() + for (i in 0 until size) { + val key = nicknames.keyAt(i) + contacts[key]?.nickname = nicknames.valueAt(i) + } + val websites = getWebsites() size = websites.size() for (i in 0 until size) {