-
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels