File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
core/src/main/java/com/alamkanak/weekview Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -36,19 +36,6 @@ internal class Navigator(
3636 maximumValue = viewState.maxX
3737 )
3838 scrollHorizontallyTo(offset = adjustedDestinationOffset, onFinished = onFinished)
39-
40- // animator.animate(
41- // fromValue = viewState.currentOrigin.x,
42- // toValue = adjustedDestinationOffset,
43- // onUpdate = {
44- // viewState.currentOrigin.x = it
45- // listener.onHorizontalScrollPositionChanged()
46- // },
47- // onEnd = {
48- // listener.onHorizontalScrollingFinished()
49- // onFinished()
50- // }
51- // )
5239 }
5340
5441 fun scrollHorizontallyTo (offset : Float , onFinished : () -> Unit = {}) {
@@ -62,12 +49,14 @@ internal class Navigator(
6249 onEnd = {
6350 if (Build .VERSION .SDK_INT > 25 ) {
6451 listener.onHorizontalScrollingFinished()
52+ onFinished()
6553 } else {
6654 // Delay calling the listener to avoid navigator.isNotRunning still
6755 // being false on API 25 and below.
6856 // See: https://github.com/thellmund/Android-Week-View/issues/227
6957 Handler (Looper .getMainLooper()).post {
7058 listener.onHorizontalScrollingFinished()
59+ onFinished()
7160 }
7261 }
7362 }
You can’t perform that action at this time.
0 commit comments