Skip to content

Commit 00eef4c

Browse files
committed
avoid pressing Plus at the group contacts to fix some glitches
1 parent 418e9de commit 00eef4c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/activities/GroupContactsActivity.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import kotlinx.android.synthetic.main.activity_group_contacts.*
1616
class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, RefreshContactsListener {
1717
private var allContacts = ArrayList<Contact>()
1818
private var groupContacts = ArrayList<Contact>()
19+
private var wasInit = false
1920
lateinit var group: Group
2021

2122
override fun onCreate(savedInstanceState: Bundle?) {
@@ -27,7 +28,9 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
2728
supportActionBar?.title = group.title
2829

2930
group_contacts_fab.setOnClickListener {
30-
fabClicked()
31+
if (wasInit) {
32+
fabClicked()
33+
}
3134
}
3235

3336
group_contacts_placeholder_2.setOnClickListener {
@@ -55,6 +58,7 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
5558

5659
private fun refreshContacts() {
5760
ContactsHelper(this).getContacts {
61+
wasInit = true
5862
allContacts = it
5963

6064
groupContacts = it.filter { it.groups.map { it.id }.contains(group.id) } as ArrayList<Contact>

0 commit comments

Comments
 (0)