Fix no contacts display
This commit is contained in:
parent
4546ae5160
commit
9eb904341e
1 changed files with 2 additions and 2 deletions
|
@ -386,7 +386,7 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
||||||
contactsList.setAdapter(new ContactsListAdapter(ContactsManager.getInstance().getAllContacts(), allContactsCursor));
|
contactsList.setAdapter(new ContactsListAdapter(ContactsManager.getInstance().getAllContacts(), allContactsCursor));
|
||||||
} else {
|
} else {
|
||||||
if (onlyDisplayLinphoneContacts) {
|
if (onlyDisplayLinphoneContacts) {
|
||||||
if (sipContactsCursor != null) {
|
if (sipContactsCursor != null && sipContactsCursor.getCount() > 0) {
|
||||||
indexer = new AlphabetIndexer(sipContactsCursor, Compatibility.getCursorDisplayNameColumnIndex(sipContactsCursor), " ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
indexer = new AlphabetIndexer(sipContactsCursor, Compatibility.getCursorDisplayNameColumnIndex(sipContactsCursor), " ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
||||||
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
|
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
|
||||||
contactsList.setAdapter(new ContactsListAdapter(ContactsManager.getInstance().getSIPContacts(), sipContactsCursor));
|
contactsList.setAdapter(new ContactsListAdapter(ContactsManager.getInstance().getSIPContacts(), sipContactsCursor));
|
||||||
|
@ -397,7 +397,7 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
||||||
edit.setEnabled(false);
|
edit.setEnabled(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (allContactsCursor != null) {
|
if (allContactsCursor != null && allContactsCursor.getCount() > 0) {
|
||||||
indexer = new AlphabetIndexer(allContactsCursor, Compatibility.getCursorDisplayNameColumnIndex(allContactsCursor), " ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
indexer = new AlphabetIndexer(allContactsCursor, Compatibility.getCursorDisplayNameColumnIndex(allContactsCursor), " ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
||||||
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
|
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
|
||||||
contactsList.setAdapter(new ContactsListAdapter(ContactsManager.getInstance().getAllContacts(), allContactsCursor));
|
contactsList.setAdapter(new ContactsListAdapter(ContactsManager.getInstance().getAllContacts(), allContactsCursor));
|
||||||
|
|
Loading…
Reference in a new issue