Skip to content

Pausing#168

Open
bqv wants to merge 3 commits intoacristescu:masterfrom
bqv:pausing
Open

Pausing#168
bqv wants to merge 3 commits intoacristescu:masterfrom
bqv:pausing

Conversation

@bqv
Copy link
Contributor

@bqv bqv commented Oct 7, 2023

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

@acristescu
Copy link
Owner

acristescu commented Oct 11, 2023

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

@bqv
Copy link
Contributor Author

bqv commented Oct 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants