diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/InsertOrEditContactActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/InsertOrEditContactActivity.kt index f5f8d9e9..25578c9f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/InsertOrEditContactActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/InsertOrEditContactActivity.kt @@ -289,7 +289,7 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener { } } - private fun showFilterDialog() { + fun showFilterDialog() { FilterContactSourcesDialog(this) { contacts_fragment?.forceListRedraw = true refreshContacts(CONTACTS_TAB_MASK or FAVORITES_TAB_MASK) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/ContactsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/ContactsFragment.kt index 17a1b53c..73816813 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/ContactsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/ContactsFragment.kt @@ -4,6 +4,7 @@ import android.content.Context import android.content.Intent import android.util.AttributeSet import com.simplemobiletools.contacts.pro.activities.EditContactActivity +import com.simplemobiletools.contacts.pro.activities.InsertOrEditContactActivity import com.simplemobiletools.contacts.pro.activities.MainActivity class ContactsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) { @@ -14,6 +15,10 @@ class ContactsFragment(context: Context, attributeSet: AttributeSet) : MyViewPag } override fun placeholderClicked() { - (activity as? MainActivity)?.showFilterDialog() + if (activity is MainActivity) { + (activity as MainActivity).showFilterDialog() + } else if (activity is InsertOrEditContactActivity) { + (activity as InsertOrEditContactActivity).showFilterDialog() + } } }