Do not reset current activity on discord party update
Instead of setting activity to in_game, in_menu just send again current discord activity. Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -352,9 +352,7 @@ public class DiscordPlugin extends Plugin
|
||||
|
||||
private void updatePresence()
|
||||
{
|
||||
discordState.triggerEvent(client.getGameState() == GameState.LOGGED_IN
|
||||
? DiscordGameEventType.IN_GAME
|
||||
: DiscordGameEventType.IN_MENU);
|
||||
discordState.refresh();
|
||||
}
|
||||
|
||||
private void checkForGameStateUpdate()
|
||||
|
||||
@@ -77,6 +77,19 @@ class DiscordState
|
||||
lastPresence = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Force refresh discord presence
|
||||
*/
|
||||
void refresh()
|
||||
{
|
||||
if (lastPresence == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
discordService.updatePresence(lastPresence);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger new discord state update.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user