Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animator.previous returns incorrect state #16

Open
absynce opened this issue Jun 12, 2020 · 3 comments
Open

Animator.previous returns incorrect state #16

absynce opened this issue Jun 12, 2020 · 3 comments

Comments

@absynce
Copy link

absynce commented Jun 12, 2020

Issue
Animator.previous always shows the initial state instead of the previous state.

Expected
Animator.previous to show the previous state.

Example Ellies

Issue since version 1.0.2. It worked as expected in 1.0.1.

@absynce absynce changed the title Animator.previous returns incorrect value Animator.previous returns incorrect state Jun 12, 2020
@matsumonkie
Copy link

Hello there!
I'm facing the same issue. I started git bisecting and it seems the culprit commit is 4461b4f that appears between 1.0.1 and 1.0.2
I can confirm 1.0.1 doesn't have this issue.

Now I don't think I can go further without investing a lot of time :-(

ps: Great lib @mdgriffith, I love it so far!

@Luftzig
Copy link

Luftzig commented Nov 4, 2020

I've created a small reproduction of this bug here: https://ellie-app.com/brTmsMSBJfFa1

@Luftzig
Copy link

Luftzig commented Nov 5, 2020

I've managed to create a workaround for displaying the entering and leaving items. The key components are:

        arrivedPage =
            Animator.arrived model.page
        currentPage =
            Animator.current model.page
        oldPage =
            if arrivedPage == currentPage then
                Nothing
            else
                Just arrivedPage

Hopefully I'll find the time to add to my example above as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants