components/calendar: Fix previous/next buttons not always working
Original commit message(s)
- components/calendar: Fix previous/next buttons not always working When you pressed the next or previous button in quick succession it wouldn't always change the view since it waited for the animation to end before actually changing the backend value.
Fix this by checking if we are moving through the velocity value, and if so, trigger the next/previous in the backend.
Reason for the change
The previous and next button simply would not do anything if the view was already moving. This fixes that by triggering the change in the backend if it is moving.
Test plan
Tested by pressing the next and previous buttons quickly. Also tested by dragging the view. Both work correctly.
Bugs fixed
PS: I accidentally pushed this change to the master branch before creating the MR (sorry!). I have reverted it and committed it anew here.
Edited by Mathias Tillman