show SELF in contact list only when creating a new single chat or when selecing a contact to attach to a message

This commit is contained in:
B. Petersen
2018-04-22 10:14:06 +02:00
parent 75b430b323
commit 652f2d0665
2 changed files with 10 additions and 2 deletions
@@ -267,9 +267,16 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
}
item.addSubItem(id_add_contact, context.getString(R.string.NewContactTitle));
int listflags = 0;
if( do_what==SELECT_CONTACTS_FOR_NEW_VERIFIED_GROUP||do_what==ADD_CONTACTS_TO_VERIFIED_GROUP) {
listflags |= MrMailbox.MR_GCL_VERIFIED_ONLY;
}
listViewAdapter = new ContactsAdapter(context,
(do_what==SELECT_CONTACTS_FOR_NEW_VERIFIED_GROUP||do_what==ADD_CONTACTS_TO_VERIFIED_GROUP)? MrMailbox.MR_GCL_VERIFIED_ONLY : 0);
if( do_what==SELECT_CONTACT_FOR_NEW_CHAT || do_what==SELECT_CONTACT_TO_ATTACH ) {
listflags |= MrMailbox.MR_GCL_ADD_SELF;
}
listViewAdapter = new ContactsAdapter(context, listflags);
if( do_what == SELECT_CONTACTS_FOR_NEW_GROUP || do_what == SELECT_CONTACTS_FOR_NEW_VERIFIED_GROUP ) {
listViewAdapter.setCheckedMap(selectedContacts);
@@ -85,6 +85,7 @@ public class MrMailbox {
// contacts
public final static int MR_GCL_VERIFIED_ONLY = 1;
public final static int MR_GCL_ADD_SELF = 2;
public native static int[] getContacts(int flags, String query);
public native static int getBlockedCount();
public native static int[] getBlockedContacts();