maxerbox / vscode-discord

A Visual studio extension, display your current project on vscode in discord with Rich Presence
ISC License
35 stars 13 forks source link

Closing Visual Studio Code does not remove the RPC information #7

Open justalemon opened 6 years ago

justalemon commented 6 years ago

Even if you close VS Code, you still will see information about the file and folder open. Information about Visual Studio Code is still on Discord

fratik commented 6 years ago

it's an issue directly with Discord. just reload it. (Ctrl+R)

maxerbox commented 6 years ago

It's because the activity is not reset when VScode is closing, I'm looking for an event to handle it.

maxerbox commented 6 years ago

With the disposable client, the Rich Presence is reset when Visual Studio Code is closed, but it's still displaying "Playing Visual Studio Code". To fix it, you need to add Visual Studio Code as a game.

justalemon commented 6 years ago

Discord says that is recomendable to send a shudown signal when the app closes, so the RPC server removes the status.

maxerbox commented 6 years ago

@justalemon May you have some docs about sending a shutdown signal to discord, it could be helpfull

justalemon commented 6 years ago

@maxerbox https://discordapp.com/developers/docs/rich-presence/how-to image

maxerbox commented 6 years ago

Yeah, it is calling the static void Destroy(BaseConnection*&); function,

https://github.com/discordapp/discord-rpc/blob/master/src/discord-rpc.cpp#L312

https://github.com/discordapp/discord-rpc/blob/master/src/connection_win.cpp#L66

It cannot be done with the discord-rpc server.

maxerbox commented 6 years ago

I hope it is fixed now ^^

Alexejhero commented 4 years ago

Hate to dig up such an old issue, but the problem is still there.