feat(discord-rpc): wire initDiscordRpc into app boot

Calls discordRpcService.initDiscordRpc() once from +page.svelte onMount so
the backend state matches the persisted toggle and the playerStore subscriber
is registered when the user has opted in.

Refs #336.

cc
This commit is contained in:
vicrodh committed 2026-05-07 01:35:19 -06:00
1 parent 7531c2f092
commit 232276f4fa
1 file changed
+3
+3
View File
@@ -517,6 +517,7 @@
resetLaunchFlow, resetLaunchFlow,
} from '$lib/services/updatesService'; } from '$lib/services/updatesService';
import type { AutoUpdateProgress } from '$lib/services/updatesService'; import type { AutoUpdateProgress } from '$lib/services/updatesService';
import { initDiscordRpc } from '$lib/services/discordRpcService';
import UpdateProgressModal from '$lib/components/updates/UpdateProgressModal.svelte'; import UpdateProgressModal from '$lib/components/updates/UpdateProgressModal.svelte';
// Offline state // Offline state
@@ -4603,6 +4604,8 @@
// Bootstrap app (theme, mouse nav, Last.fm restore) // Bootstrap app (theme, mouse nav, Last.fm restore)
const { cleanup: cleanupBootstrap } = bootstrapApp(); const { cleanup: cleanupBootstrap } = bootstrapApp();
void initDiscordRpc();
// Window-title preference: load from localStorage and subscribe so that // Window-title preference: load from localStorage and subscribe so that
// toggling the setting updates the OS title bar immediately. // toggling the setting updates the OS title bar immediately.
initWindowTitleStore(); initWindowTitleStore();