diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/fragments/MyViewPagerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/fragments/MyViewPagerFragment.kt index 805eb5ee..defca5ad 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/fragments/MyViewPagerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/fragments/MyViewPagerFragment.kt @@ -86,6 +86,12 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet) } fun refreshContacts(contacts: ArrayList) { + if ((config.showTabs and CONTACTS_TAB_MASK == 0 && this is ContactsFragment) || + (config.showTabs and FAVORITES_TAB_MASK == 0 && this is FavoritesFragment) || + (config.showTabs and GROUPS_TAB_MASK == 0 && this is GroupsFragment)) { + return + } + if (config.lastUsedContactSource.isEmpty()) { val grouped = contacts.groupBy { it.source }.maxWith(compareBy { it.value.size }) config.lastUsedContactSource = grouped?.key ?: ""