Fix Discord playtime counter resetting on every activity change#36973
Fix Discord playtime counter resetting on every activity change#36973peppy merged 1 commit intoppy:masterfrom
Conversation
| private readonly RichPresence presence = new RichPresence | ||
| { | ||
| Assets = new Assets { LargeImageKey = "osu_logo_lazer" }, | ||
| Timestamps = Timestamps.Now, |
There was a problem hiding this comment.
Just noting that this will make the timestamp be set only once when the game starts, it will not be updated whenever the activity changes. I don't remember for sure if this was the behaviour already before Discord broke it, but I suppose it might be worth updating it (in a future PR) to display time spent in beatmap/MP lobby/etc., since that's how the rich presence seems to be used nowadays.
There was a problem hiding this comment.
It was the behaviour previously yeah, but at some point about a year ago discord decided to start resetting the counter on every activity change if there was no timestamp set.
I think most people are used to this timer being a "how long has the game been open" timer, as that is how it works in other games/non rich presence games and every once in a while I see people ask why it keeps resetting every time, recent example from dev discord.
|
I think the timestamp should actually reset (and use the other countdown timer) whenever you are playing a beatmap to show progress |
|
They've removed the countdown timer as well sadly, now you can only use that if you use a |
It is possible. The image of |
…36973) Discord resets the playtime counter on the rich presence whenever the status changes since there's no timestamp set as the start time for the activity. This PR adds the timestamp as `Timestamps.Now` as per the [library docs](https://lachee.github.io/discord-rpc-csharp/articles/features/timestamps.html) <table> <tr> <td> Before <td> After <tr> <td> https://github.com/user-attachments/assets/a745967a-3dfa-4f70-938c-a9abd45866c6 <td> https://github.com/user-attachments/assets/09c24fde-f150-4a3b-bb6a-afb325561508 </table>
Discord resets the playtime counter on the rich presence whenever the status changes since there's no timestamp set as the start time for the activity. This PR adds the timestamp as
Timestamps.Nowas per the library docsbefore.mp4
after.mp4