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

Commit 2c7fdac9 authored by Walter Jang's avatar Walter Jang
Browse files

Don't skip pending check when save to account changed

Bug 25231216

Change-Id: I342a25ce52735052c2b4d5a6620581067c68762a
parent 7de2068c
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -123,7 +123,6 @@ abstract public class ContactEditorBaseFragment extends Fragment implements

    private static final String KEY_HAS_NEW_CONTACT = "hasNewContact";
    private static final String KEY_NEW_CONTACT_READY = "newContactDataReady";
    private static final String KEY_NEW_CONTACT_ACCOUNT_CHANGED = "newContactAccountChanged";

    private static final String KEY_IS_EDIT = "isEdit";
    private static final String KEY_EXISTING_CONTACT_READY = "existingContactDataReady";
@@ -497,7 +496,6 @@ abstract public class ContactEditorBaseFragment extends Fragment implements

            mHasNewContact = savedState.getBoolean(KEY_HAS_NEW_CONTACT);
            mNewContactDataReady = savedState.getBoolean(KEY_NEW_CONTACT_READY);
            mNewContactAccountChanged = savedState.getBoolean(KEY_NEW_CONTACT_ACCOUNT_CHANGED);

            mIsEdit = savedState.getBoolean(KEY_IS_EDIT);
            mExistingContactDataReady = savedState.getBoolean(KEY_EXISTING_CONTACT_READY);
@@ -615,7 +613,6 @@ abstract public class ContactEditorBaseFragment extends Fragment implements
        outState.putInt(KEY_STATUS, mStatus);
        outState.putBoolean(KEY_HAS_NEW_CONTACT, mHasNewContact);
        outState.putBoolean(KEY_NEW_CONTACT_READY, mNewContactDataReady);
        outState.putBoolean(KEY_NEW_CONTACT_ACCOUNT_CHANGED, mNewContactAccountChanged);
        outState.putBoolean(KEY_IS_EDIT, mIsEdit);
        outState.putBoolean(KEY_EXISTING_CONTACT_READY, mExistingContactDataReady);
        outState.putBoolean(KEY_RAW_CONTACT_DISPLAY_ALONE_IS_READ_ONLY,
@@ -917,10 +914,7 @@ abstract public class ContactEditorBaseFragment extends Fragment implements

        mStatus = Status.SAVING;

        // If the user did nothing else expect change the account type, we must still
        // consider this as an unsaved change so the new rawcontact is passed back to the
        // compact editor on inserts.
        if (!mNewContactAccountChanged && !hasPendingChanges()) {
        if (!hasPendingChanges()) {
            if (mLookupUri == null && saveMode == SaveMode.RELOAD) {
                // We don't have anything to save and there isn't even an existing contact yet.
                // Nothing to do, simply go back to editing mode
+0 −1
Original line number Diff line number Diff line
@@ -411,7 +411,6 @@ public class ContactEditorFragment extends ContactEditorBaseFragment implements
                        UiClosables.closeQuietly(popup);
                        AccountWithDataSet newAccount = adapter.getItem(position);
                        if (!newAccount.equals(currentAccount)) {
                            mNewContactAccountChanged = true;
                            rebindEditorsForNewContact(currentState, currentAccount, newAccount);
                        }
                    }