Fix contact selection behavior when searching and clear search on selection.

This commit is contained in:
Alex Hart
2020-06-02 16:27:04 -03:00
committed by GitHub
parent ae87d23003
commit 7f2439f1e9
4 changed files with 88 additions and 20 deletions

View File

@@ -82,6 +82,10 @@ public class CreateGroupActivity extends ContactSelectionActivity {
@Override
public void onContactSelected(Optional<RecipientId> recipientId, String number) {
if (contactsFragment.hasQueryFilter()) {
getToolbar().clear();
}
if (contactsFragment.getSelectedContactsCount() >= MINIMUM_GROUP_SIZE) {
enableNext();
}
@@ -89,6 +93,10 @@ public class CreateGroupActivity extends ContactSelectionActivity {
@Override
public void onContactDeselected(Optional<RecipientId> recipientId, String number) {
if (contactsFragment.hasQueryFilter()) {
getToolbar().clear();
}
if (contactsFragment.getSelectedContactsCount() < MINIMUM_GROUP_SIZE) {
disableNext();
}