implement placeholder clicks at the Select Contact screen
This commit is contained in:
parent
16ca90b219
commit
794e99e5c2
|
@ -289,7 +289,7 @@ class InsertOrEditContactActivity : SimpleActivity(), RefreshContactsListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showFilterDialog() {
|
fun showFilterDialog() {
|
||||||
FilterContactSourcesDialog(this) {
|
FilterContactSourcesDialog(this) {
|
||||||
contacts_fragment?.forceListRedraw = true
|
contacts_fragment?.forceListRedraw = true
|
||||||
refreshContacts(CONTACTS_TAB_MASK or FAVORITES_TAB_MASK)
|
refreshContacts(CONTACTS_TAB_MASK or FAVORITES_TAB_MASK)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import com.simplemobiletools.contacts.pro.activities.EditContactActivity
|
import com.simplemobiletools.contacts.pro.activities.EditContactActivity
|
||||||
|
import com.simplemobiletools.contacts.pro.activities.InsertOrEditContactActivity
|
||||||
import com.simplemobiletools.contacts.pro.activities.MainActivity
|
import com.simplemobiletools.contacts.pro.activities.MainActivity
|
||||||
|
|
||||||
class ContactsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) {
|
class ContactsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) {
|
||||||
|
@ -14,6 +15,10 @@ class ContactsFragment(context: Context, attributeSet: AttributeSet) : MyViewPag
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun placeholderClicked() {
|
override fun placeholderClicked() {
|
||||||
(activity as? MainActivity)?.showFilterDialog()
|
if (activity is MainActivity) {
|
||||||
|
(activity as MainActivity).showFilterDialog()
|
||||||
|
} else if (activity is InsertOrEditContactActivity) {
|
||||||
|
(activity as InsertOrEditContactActivity).showFilterDialog()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue