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

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

Don't allow newly writable contact splits

It will result in an empty contact

Bug 21464081

Change-Id: I36e79b82ff7d8d3002eabfe735bccda75ee110a7
parent 83056011
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -754,8 +754,9 @@ abstract public class ContactEditorBaseFragment extends Fragment implements
        } else if (Intent.ACTION_EDIT.equals(mAction) ||
                ContactEditorBaseActivity.ACTION_EDIT.equals(mAction)) {
            HelpUtils.prepareHelpMenuItem(mContext, helpMenu, R.string.help_url_people_edit);
            // Split only if more than one raw profile and not a user profile
            splitMenu.setVisible(mState.size() > 1 && !isEditingUserProfile());
            // Split only if there is more than one raw (non-user profile) contact and doing so
            // won't result in an empty contact
            splitMenu.setVisible(mState.size() > 1 && !isEditingUserProfile() && !mHasNewContact);
            // Cannot join a user profile
            joinMenu.setVisible(!isEditingUserProfile());
            deleteMenu.setVisible(!mDisableDeleteMenuOption);