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

Commit 0892205d authored by Katherine Kuan's avatar Katherine Kuan
Browse files

Contact detail pixel perfect

- Use 3rd party action body instead of showing status message
(This will make it more uniform with Quick Contacts)

- Change max lines on group + website fields

Bug: 4689488
Change-Id: I06928ac6ba0d3d96499e474bafd9a3d021b79438
parent 528560be
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -670,7 +670,7 @@ public class ContactDetailFragment extends Fragment implements FragmentKeyListen
                } else if (Website.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
                    // Build Website entries
                    entry.uri = null;
                    entry.maxLines = 10;
                    entry.maxLines = 1;
                    try {
                        WebAddress webAddress = new WebAddress(entry.data);
                        entry.intent = new Intent(Intent.ACTION_VIEW,
@@ -711,14 +711,12 @@ public class ContactDetailFragment extends Fragment implements FragmentKeyListen
                    entry.intent = new Intent(Intent.ACTION_VIEW);
                    entry.intent.setDataAndType(entry.uri, entry.mimetype);

                    // Use social summary when requested by external source
                    final DataStatus status = mContactData.getStatuses().get(entry.id);
                    final boolean hasSocial = kind.actionBodySocial && status != null;
                    if (hasSocial) {
                        entry.applyStatus(status, true);
                    if (kind.actionBody != null) {
                         CharSequence body = kind.actionBody.inflateUsing(mContext, entryValues);
                         entry.data = (body == null) ? null : body.toString();
                    }

                    if (hasSocial || hasData) {
                    if (!TextUtils.isEmpty(entry.data)) {
                        // If the account type exists in the hash map, add it as another entry for
                        // that account type
                        if (mOtherEntriesMap.containsKey(type)) {
@@ -749,6 +747,7 @@ public class ContactDetailFragment extends Fragment implements FragmentKeyListen
            entry.mimetype = GroupMembership.MIMETYPE;
            entry.kind = mContext.getString(R.string.groupsLabel);
            entry.data = sb.toString();
            entry.maxLines = 10;
            mGroupEntries.add(entry);
        }
    }