From 10ac988451c2fa37fb8090f776dd4b2610b754d6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 7 Dec 2019 09:44:52 +0100 Subject: [PATCH] do not allow long pressing contacts at the Select Contact screen --- .../contacts/pro/fragments/MyViewPagerFragment.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt index 4d5aea7d..198c4983 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt @@ -191,7 +191,12 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet) val currAdapter = fragment_list.adapter if (currAdapter == null || forceListRedraw) { forceListRedraw = false - val location = if (this is FavoritesFragment) LOCATION_FAVORITES_TAB else LOCATION_CONTACTS_TAB + val location = when { + activity is InsertOrEditContactActivity -> LOCATION_INSERT_OR_EDIT + this is FavoritesFragment -> LOCATION_FAVORITES_TAB + else -> LOCATION_CONTACTS_TAB + } + ContactsAdapter(activity as SimpleActivity, contacts, activity as RefreshContactsListener, location, null, fragment_list, fragment_fastscroller) { (activity as RefreshContactsListener).contactClicked(it as Contact) }.apply {