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).
Fixed
rpc.on()
andrpc.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 ultimatelyupdateDiscordActivity
never sets rich presence.Bug observed, and fix tested on Pop!_OS 20.04 (Ubuntu 20.04).