cesko-digital / movapp

Naučte se základy češtiny a ukrajinštiny pro běžné životní situace. / Вивчіть основи чеської та української мови для повсякденного життя. / Learn the basics of Czech and Ukrainian for everyday life situations.
https://www.movapp.cz
MIT License
20 stars 20 forks source link

add Plausible event - Story-Started and Story-Finished #355

Closed daria31v closed 1 year ago

met commented 1 year ago

When story is finished then moving of slider back triggers the Story-finished event hundred times.

@jejdacz Did you try last commit in this PR? This bug with repeating Story-Ended I have seen in the beginning but after Daria corrected in last commit it I do not see them again.

jejdacz commented 1 year ago

When story is finished then moving of slider back triggers the Story-finished event hundred times.

@jejdacz Did you try last commit in this PR? This bug with repeating Story-Ended I have seen in the beginning but after Daria corrected in last commit it I do not see them again.

Im synced to last commit.

jejdacz commented 1 year ago

Be aware that code needs to stay functional when language is switched. The first switch is in menu and second is in story itself. When you have some of this variables in useeffect deps then it is triggered. So you need condition inside to watch only relevant variables.

jejdacz commented 1 year ago

I will send you my solution to slack.

daria31v commented 1 year ago

I ask you to consider this option. And I want to note that, unfortunately, the option with the variable const audioEnded = useRef(false); does not work correctly for me. Namely, the event is not sent at the right time. This edition is stable for me. Please test.