Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich presence not updating when switching between multiple VS instances #47

Open
boulandm opened this issue Dec 20, 2023 · 1 comment
Open

Comments

@boulandm
Copy link

Hello,

The rich presence is not updating in Discord when switching focus between multiple instances of VS. The rich presence seems to be stuck on the first instance and does not update to reflect the active instance.

When I disable the extension using the options dialog, the status then updates to reflect the newly focused instance.

Could you provide some guidance on where in the code this issue might be originating? I'd be willing to contribute a fix through a pull request if that's possible.

Thank you.

@Reavert
Copy link
Owner

Reavert commented Dec 20, 2023

Hi!
A DiscordRpcController.cs class is responsible for updating Discord Rich Presence via _discordRpcClient.
It creates a thread (SendRichPresenceData method is a thread start point) that updates Discord Rich Presence periodically if there have been any changes of presence (_isDirty flag) (Code Link)

The _discordRpcClientcalls SetPresence method and passes an instance of the object of type RichPresence (RichPresence stores which data needs to be displayed in Discord)

It seems to me that somewhere in this method you will need to change or add something that will solve this issue.

But I'm not sure if it's possible to somehow change the order of Discord activities from the client. Maybe the logic of setting the order of activities is processed on the side of Discard servers (for example, the activity that was launched last is displayed first, as you wrote in the description of the issue).

Thank you for your interest in extension.
It will be very nice if you find a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants