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

Commit bc365a61 authored by Daniel Lehmann's avatar Daniel Lehmann
Browse files

Stop double-animating when removing the last editor. Fixes jump cuts

Bug:6009430
Change-Id: I8e0a24334a5d92bc300f4d0ff15da99f4786852c
parent 34a3ab19
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -113,18 +113,12 @@ 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();

            // This is already animated, don't do anything further here
            animate = false;
        }
        updateAddFooterVisible(animate);
    }

    @Override