Skip to content

Commit

Permalink
fix(queue): respect pre-ready up
Browse files Browse the repository at this point in the history
  • Loading branch information
garrappachc committed Mar 3, 2024
1 parent 3dbc81c commit fb1ae49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import { derived } from 'svelte/store';
import { readyUp } from '$lib/queue/api/ready-up';
import { leaveQueue } from '$lib/queue/api/leave-queue';
import { isPreReadied } from '$lib/queue/pre-ready-up.store';
export let data: LayoutData;
Expand Down Expand Up @@ -122,6 +123,11 @@
let previousAwaitsReadyUp: boolean | undefined = undefined;
awaitsReadyUp.subscribe($awaitsReadyUp => {
if ($isPreReadied) {
readyUp();
return;
}
if ($awaitsReadyUp && previousAwaitsReadyUp === false) {
notification = new Notification('Ready up!', {
body: 'A new pickup game is starting',
Expand Down

0 comments on commit fb1ae49

Please sign in to comment.