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

Commit d4d0e708 authored by Ben Kwa's avatar Ben Kwa
Browse files

Don't clear the selection when directory contents change.

Update the selection to remove IDs that no longer exist, but don't clear
it - doing so causes the selection to vanish whenever the underlying
directory contents change, which is disruptive to the user.

BUG=22765812

Change-Id: Ice6ae54d0748cf842addf1342541ae7759435811
parent a262f246
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -129,9 +129,11 @@ public final class MultiSelectManager implements View.OnKeyListener {

                    @Override
                    public void onChanged() {
                        // TODO: This is causing b/22765812
                        mSelection.clear();
                        mModelIds = mAdapter.getModelIds();

                        // Update the selection to remove any disappeared IDs.
                        mSelection.cancelProvisionalSelection();
                        mSelection.intersect(mModelIds);
                    }

                    @Override