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

Commit 87551107 authored by kaiyiz's avatar kaiyiz Committed by Steve Kondik
Browse files

Contacts: "Add new" will disappear

It isn't update the view when delete the editor.

Update the state of the view when delete the editor.

CRs-Fixed: 537322

Change-Id: Ie773497d480f87fa323b4ac2e3fd4bc89e4eb1a7
parent 4ede3a30
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -113,12 +113,16 @@ public class KindSectionView extends LinearLayout implements EditorListener {
    public void onDeleteRequested(Editor editor) {
        // If there is only 1 editor in the section, then don't allow the user to delete it.
        // Just clear the fields in the editor.
        final boolean animate;
        if (getEditorCount() == 1) {
            editor.clearAllFields();
            animate = true;
        } else {
            // Otherwise it's okay to delete this {@link Editor}
            editor.deleteEditor();
            animate = false;
        }
        updateAddFooterVisible(animate);
    }

    @Override