Skip to content

Commit 542ed8e

Browse files
author
tuxor1337
committed
Stop Flinger before gotoPage. Fixes #48.
1 parent fcf949f commit 542ed8e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

document-viewer/src/main/java/org/ebookdroid/core/EventGotoPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public ViewState process() {
7777
final int top = Math.round(p.y);
7878

7979
if (isScrollRequired(left, top, scrollX, scrollY)) {
80+
view.forceFinishScroll();
8081
view.scrollTo(left, top);
8182
viewState.update();
8283
return viewState;

document-viewer/src/main/java/org/emdev/ui/widget/Flinger.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ public boolean computeScrollOffset() {
110110
currY = finalY;
111111
oldProgress = 1;
112112
// System.out.println("Finished: " + currY);
113-
return true;
113+
// It was not really finished, but it surely is now.
114+
return false;
114115
}
115116
}
116117
// System.out.println("Flinger.computeScrollOffset(" + SystemClock.uptimeMillis() + ")");

0 commit comments

Comments
 (0)