+3
-1
frontend/src/lib/queue.svelte.ts
+3
-1
frontend/src/lib/queue.svelte.ts
···
2
2
import type { QueueResponse, QueueState, Track } from './types';
3
3
import { API_URL } from './config';
4
4
import { APP_BROADCAST_PREFIX } from './branding';
5
+
import { auth } from './auth.svelte';
5
6
6
7
const SYNC_DEBOUNCE_MS = 250;
7
8
···
141
142
142
143
private isAuthenticated(): boolean {
143
144
if (!browser) return false;
144
-
return !!localStorage.getItem('session_id');
145
+
return auth.isAuthenticated;
145
146
}
146
147
147
148
async fetchQueue(force = false) {
···
188
189
this.revision = data.revision;
189
190
this.etag = newEtag;
190
191
192
+
this.lastUpdateWasLocal = false;
191
193
this.applySnapshot(data);
192
194
} catch (error) {
193
195
console.error('failed to fetch queue:', error);