Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81029593 authored by Katherine Kuan's avatar Katherine Kuan
Browse files

Use contact ID instead of photo ID for group member list

We will be able to avoid doing an extra query of finding
the contact using the lookup key instead of using the
correct ID.

Bug: 5608876
Change-Id: Ica6db5dd01688bb789c732009f5116811b4ebd26
parent caa3cae2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public final class GroupMemberLoader extends CursorLoader {

    public static class GroupDetailQuery {
        private static final String[] PROJECTION = new String[] {
            Data.PHOTO_ID,                          // 0
            Data.CONTACT_ID,                        // 0
            Data.PHOTO_URI,                         // 1
            Data.LOOKUP_KEY,                        // 2
            Data.DISPLAY_NAME_PRIMARY,              // 3
@@ -60,7 +60,7 @@ public final class GroupMemberLoader extends CursorLoader {
            Data.CONTACT_STATUS,                    // 5
        };

        public static final int CONTACT_PHOTO_ID             = 0;
        public static final int CONTACT_ID                   = 0;
        public static final int CONTACT_PHOTO_URI            = 1;
        public static final int CONTACT_LOOKUP_KEY           = 2;
        public static final int CONTACT_DISPLAY_NAME_PRIMARY = 3;
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ public class ContactTileAdapter extends BaseAdapter {
         * the correct {@link Cursor}s will be given.
         */
        if (mDisplayType == DisplayType.GROUP_MEMBERS) {
            mIdIndex = GroupDetailQuery.CONTACT_PHOTO_ID;
            mIdIndex = GroupDetailQuery.CONTACT_ID;
            mLookupIndex = GroupDetailQuery.CONTACT_LOOKUP_KEY;
            mPhotoUriIndex = GroupDetailQuery.CONTACT_PHOTO_URI;
            mNameIndex = GroupDetailQuery.CONTACT_DISPLAY_NAME_PRIMARY;