LISTEN-moe / desktop-app

Official LISTEN.moe Desktop Client
https://listen.moe/apps
91 stars 8 forks source link

fix: Discord RPC dead code #38

Closed muazamkamal closed 4 years ago

muazamkamal commented 4 years ago

Fixed rpc.on() and rpc.login() dead code by moving it before the checking-for-update try-catch block.

Both never ran when app version is the latest since app.getVersion() === json.name will return early. This means RPC never logs in, rpcReady never sets to true and ultimately updateDiscordActivity never sets rich presence.

Bug observed, and fix tested on Pop!_OS 20.04 (Ubuntu 20.04).