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

Commit 03587ecd authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Remove join/split buttons for profile

Bug: 5149871 There should not be a way to Join/Split profiles
Change-Id: I4c7782d67f04fe494ed1825e631d2b8c1ae5810b
parent c357bf90
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -803,7 +803,14 @@ public class ContactEditorFragment extends Fragment implements
        // TODO: Find a better way to handle shortcuts, i.e. onKeyDown()?
        menu.findItem(R.id.menu_done).setVisible(false);

        menu.findItem(R.id.menu_split).setVisible(mState != null && mState.size() > 1);
        boolean editingUserProfile = mIsUserProfile || mNewLocalProfile;
        // Split only if more than one raw profile and not a user profile
        menu.findItem(R.id.menu_split).setVisible(mState != null && mState.size() > 1 &&
                !editingUserProfile);
        // Cannot join a user profile
        menu.findItem(R.id.menu_join).setVisible(!editingUserProfile);


        int size = menu.size();
        for (int i = 0; i < size; i++) {
            menu.getItem(i).setEnabled(mEnabled);