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:
1 file changed
+3
@@ -517,6 +517,7 @@
|
||||
resetLaunchFlow,
|
||||
} 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';
|
||||
|
||||
// Offline state
|
||||
@@ -4603,6 +4604,8 @@
|
||||
// Bootstrap app (theme, mouse nav, Last.fm restore)
|
||||
const { cleanup: cleanupBootstrap } = bootstrapApp();
|
||||
|
||||
void initDiscordRpc();
|
||||
|
||||
// Window-title preference: load from localStorage and subscribe so that
|
||||
// toggling the setting updates the OS title bar immediately.
|
||||
initWindowTitleStore();
|
||||
|
||||
Reference in new issue
Block a user