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

Commit b4154e46 authored by Brian Attwell's avatar Brian Attwell
Browse files

Don't save contact after deleting it

Bug: 18514447
Change-Id: I695aa41eb6870b7c256efb9f5eccf9e0eadefe4f
parent 94457c0d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1428,7 +1428,7 @@ public class ContactEditorFragment extends Fragment implements
    public static interface Listener {
        /**
         * Contact was not found, so somehow close this fragment. This is raised after a contact
         * is removed via Menu/Delete (unless it was a new contact)
         * is removed via Menu/Delete
         */
        void onContactNotFound();

@@ -1941,8 +1941,9 @@ public class ContactEditorFragment extends Fragment implements
            final long loaderCurrentTime = SystemClock.elapsedRealtime();
            Log.v(TAG, "Time needed for loading: " + (loaderCurrentTime-mLoaderStartTime));
            if (!data.isLoaded()) {
                // Item has been deleted
                // Item has been deleted. Close activity without saving again.
                Log.i(TAG, "No contact found. Closing activity");
                mStatus = Status.CLOSING;
                if (mListener != null) mListener.onContactNotFound();
                return;
            }