Hey guys, having some trouble here.
I got a imitation homework in college, and I decided object to be Youtube.
I was doing the “comment” part with the like and dislike buttons, so the goals are:
- Press like or dislike, the icon turns black (selected)
- Press like, the like count self-pluses by 1, so as dislike
- Press like, the dislike turn unselected, vice versa
- If like is already pressed, press again make it unselected, and self-subtracts by 1
And I make a simple prototype to demonstrate:
By the way those two buttons are in one selection group and the repeater is selection group isolated.
I found out that if you press like or dislike several times, the number just go up and the button won’t turn black, which don’t match with goal 4.
Something must be wrong with the selection state.
After many failed attempt to solve the problem, it came to me that maybe the action “edit row data” updates the selection state of widgets inside repeaters.
So I add “wait for 1 second” actions between selection set and row data edit.
Now the button turns black, 1 second later white and the number goes up by 1.
That might proves me right.
Is there some other ways to achieve my 4 goals and the action “edit row data” to updates the selection state of widgets inside repeaters.
Or is there a bug?
Huge thanks!