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

Commit 52112414 authored by Yorke Lee's avatar Yorke Lee
Browse files

Disable drag and drop if the undo dialog for a favorite is showing

Bug: 10955634
Change-Id: I1a562a03aa7a7de016687803c154b6a3915e3e10
parent b4680c5b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -325,6 +325,11 @@ public class PhoneFavoriteListView extends ListView implements SwipeHelperCallba
        }

        final ContactTileRow tile = (ContactTileRow) child;

        if (tile.getTileAdapter().hasPotentialRemoveEntryIndex()) {
            return false;
        }

        final int itemIndex = tile.getItemIndex(x, y);
        if (itemIndex != -1 && mOnDragDropListener != null) {
            final PhoneFavoriteTileView tileView =
+4 −0
Original line number Diff line number Diff line
@@ -667,6 +667,10 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements
        mPotentialRemoveEntryIndex = -1;
    }

    public boolean hasPotentialRemoveEntryIndex() {
        return isIndexInBound(mPotentialRemoveEntryIndex);
    }

    /**
     * Clears all temporary variables at a new interaction.
     */