OnlineGo icon indicating copy to clipboard operation
OnlineGo copied to clipboard

Pausing

Open bqv opened this issue 2 years ago • 2 comments
trafficstars

Speaks for itself, really.

Something weird happens here, maybe you can advise, the state of the pause button doesn't update until you leave and re-enter the game viewer, I think either it's not coming down from the api properly or I'm just not comprehending the intricacies of the gameui state

bqv avatar Oct 07 '23 21:10 bqv

I initially thought it was the Molecule library state management, but I tried it, and it's not. What happens is again one of those OGS legacy things that wasted me hours: On pause you get a clock event on the websocket which causes some updates to happen in ActiveGameRepository::onGameClock. It will take some poking around to see what we need to update there on the Game object so that the pause is updated, but otherwise your code will only look at the latest values returned through the REST API.

It's not a trivial fix.

image

acristescu avatar Oct 11 '23 16:10 acristescu

Actually, this one works now, without considering special cases like moderator pause in too much detail. Thanks for the heads up! More low hanging fruit if you want to merge

bqv avatar Oct 11 '23 17:10 bqv