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

Commit 5a1c7b0e authored by Garfield Tan's avatar Garfield Tan
Browse files

Fix an issue that DocUI may not refresh on content change.

GestureSelector only starts on MOVE_EVENT, but always stops on UP_EVENT,
so it'll unlock DirectoryReadLock even if it is never locked on simple
taps.

Change-Id: I2d163231e4b91e0dc83e31ce05983f4c9b610ddb
parent b8782d39
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ public final class DirectoryReloadLock {
    @MainThread
    public void unblock() {
        Shared.checkMainLoop();
        assert(mPauseCount > 0);
        mPauseCount--;
        if (mPauseCount == 0 && mCallback != null) {
            mCallback.run();
+5 −3
Original line number Diff line number Diff line
@@ -179,9 +179,11 @@ public final class GestureSelector {
    // Essentially, since this means all gesture movement is over, reset everything.
    private boolean handleUpEvent(InputEvent e) {
        mLastStartedItemPos = -1;
        if (mStarted) {
            mStarted = false;
            mSelectionMgr.getSelection().applyProvisionalSelection();
            mLock.unblock();
        }
        return false;
    }