OnlineGo
OnlineGo copied to clipboard
Pausing
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
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.
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