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

Clicking the button during the animation might cause button state confusion #5

Open
YassKnight opened this issue Oct 9, 2021 · 1 comment

Comments

@YassKnight
Copy link

YassKnight commented Oct 9, 2021

Thank you for your invitation
I've been looking at your team's code and I feel pretty good about it.We are very happy to introduce this project into our project
However, I found a small flaw in the fact that clicking the button during the animation might cause button state confusion

 binder.button.setOnClickListener {
            isNight = if(isNight){
                ThemeManager.instance.reverseChangeTheme(LightTheme(), it)
                false
            }else{
                ThemeManager.instance.changeTheme(NightTheme(), it)
                true
            }
               ...
        }
fun changeTheme(
        newTheme: AppTheme,
        sourceCoordinate: Coordinate,
        animDuration: Long,
        isReverse: Boolean
    ) {
         ...

        if (frontFakeThemeImageView.visibility == View.VISIBLE ||
            behindFakeThemeImageView.visibility == View.VISIBLE ||
            isRunningChangeThemeAnimation()
        ) {
            return
        }
         ...
      }

I think the easy way to do that is to add a return value.Maybe not a good way to handle it

Hope your project will get better and better

@imandolatkia
Copy link
Owner

Thank you @YassKnight.
We are so happy that you are using our library.
Can you send us a gif or video about the small flaw that you said?
You can upload it here or send it to iman.dolatkia@gmail.com.

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

2 participants