fix(deps): update dependency @xhayper/discord-rpc to v1.2.0 (#2291)

* fix(deps): update dependency @xhayper/discord-rpc to v1.2.0

* fix: discord-rpc

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: JellyBrick <shlee1503@naver.com>
This commit is contained in:
renovate[bot]
2024-07-31 21:57:37 +09:00
committed by GitHub
parent 23e688aaf8
commit 8924ec29d3
4 changed files with 78 additions and 64 deletions

View File

@ -209,8 +209,8 @@ export const backend = createBackend<
info.rpc.user?.setActivity(activityInfo).catch(console.error);
},
async start({ window: win, getConfig }) {
this.config = await getConfig();
async start(ctx) {
this.config = await ctx.getConfig();
info.rpc.on('connected', () => {
if (dev()) {
@ -239,10 +239,10 @@ export const backend = createBackend<
info.autoReconnect = this.config.autoReconnect;
window = win;
window = ctx.window;
// If the page is ready, register the callback
win.once('ready-to-show', () => {
ctx.window.once('ready-to-show', () => {
let lastSongInfo: SongInfo;
registerCallback((songInfo) => {
lastSongInfo = songInfo;