mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-08 07:38:41 +01:00
avoid pressing Plus at the group contacts to fix some glitches
This commit is contained in:
parent
418e9de54f
commit
00eef4cce4
@ -16,6 +16,7 @@ import kotlinx.android.synthetic.main.activity_group_contacts.*
|
|||||||
class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, RefreshContactsListener {
|
class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, RefreshContactsListener {
|
||||||
private var allContacts = ArrayList<Contact>()
|
private var allContacts = ArrayList<Contact>()
|
||||||
private var groupContacts = ArrayList<Contact>()
|
private var groupContacts = ArrayList<Contact>()
|
||||||
|
private var wasInit = false
|
||||||
lateinit var group: Group
|
lateinit var group: Group
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
@ -27,8 +28,10 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||||||
supportActionBar?.title = group.title
|
supportActionBar?.title = group.title
|
||||||
|
|
||||||
group_contacts_fab.setOnClickListener {
|
group_contacts_fab.setOnClickListener {
|
||||||
|
if (wasInit) {
|
||||||
fabClicked()
|
fabClicked()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
group_contacts_placeholder_2.setOnClickListener {
|
group_contacts_placeholder_2.setOnClickListener {
|
||||||
fabClicked()
|
fabClicked()
|
||||||
@ -55,6 +58,7 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||||||
|
|
||||||
private fun refreshContacts() {
|
private fun refreshContacts() {
|
||||||
ContactsHelper(this).getContacts {
|
ContactsHelper(this).getContacts {
|
||||||
|
wasInit = true
|
||||||
allContacts = it
|
allContacts = it
|
||||||
|
|
||||||
groupContacts = it.filter { it.groups.map { it.id }.contains(group.id) } as ArrayList<Contact>
|
groupContacts = it.filter { it.groups.map { it.id }.contains(group.id) } as ArrayList<Contact>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user