mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user