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

Commit e5e7aefb authored by Walter Jang's avatar Walter Jang
Browse files

Don't show groups on the compact editor if there's more than 1

Bug 24980001
Bug 23589603

Change-Id: I4492c0036f826d591f59e5ab18b034afe21990ff
parent 0fafb0e2
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ import android.widget.LinearLayout;
import android.widget.ListPopupWindow;
import android.widget.TextView;

import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -76,7 +75,6 @@ import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;

/**
@@ -995,6 +993,14 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O
                continue;
            }

            // Don't show more than one group editor on the compact editor.
            // Groups will still be editable for each raw contact individually on the full editor.
            if (GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType)
                    && kindSectionDataList.size() > 1) {
                vlog("kind: " + i + " " + mimeType + " dropped");
                continue;
            }

            if (kindSectionDataList != null && !kindSectionDataList.isEmpty()) {
                vlog("kind: " + i + " " + mimeType + ": " + kindSectionDataList.size() +
                        " kindSectionData(s)");