Skip to content

Commit

Permalink
Fix rare UI issue when onRefreshRound() is triggered during round res…
Browse files Browse the repository at this point in the history
…ults screen
  • Loading branch information
tzhf committed Apr 12, 2024
1 parent c31b8f0 commit 5a09c7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderer/components/Frame.vue
Expand Up @@ -194,7 +194,9 @@ onBeforeUnmount(
onBeforeUnmount(
chatguessrApi.onRefreshRound((location) => {
gameState.value = 'in-round'
// this condition prevents gameState to switch to 'in-round' if 'onRefreshRound' is triggered (happens sometimes) on round results screen
// this is because of "did-frame-finish-load" based logic, ideally we would want something else
if (gameState.value !== 'round-results') gameState.value = 'in-round'
currentLocation.value = location
if (satelliteMode.value.enabled) {
rendererApi.showSatelliteMap(location)
Expand Down

0 comments on commit 5a09c7f

Please sign in to comment.