From 306eb28d78c9aa83669307dc49daacb94f8c8742 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 28 Jul 2025 15:13:36 +0800 Subject: Location for Discord Rich Presence Activity State I was going to use LLAgentUI::buildLocationString but there's no location format that shows only region and coords without having to have the parcel name empty, so I copied buildLocationString implementation in the case of LOCATION_FORMAT_NO_MATURITY but when the parcel name is empty. I had to make updateDiscordActivity check agent's ID and the existence of agent avatar pointer first before trying to set Activity Details or State, cause I like the "Show location" button be checkable not only after online when both the ID & pointer will have existed. I think this way is simpler than programmatically enabling the "Show location" button after the user is logged in. I put a trigger to Activity update somewhere after the user is logged in for now, not yet after a TP. The elapsed time gets reset whenever Activity is updated for now, but I'll try to make elapsed time extended instead. No Party for now, because I couldn't find a way to make a Party shown without showing its CurrentSize (I could still get away not showing its MaxSize by setting it to 0), so the State (location) is shown above the elapsed time, not on the right of it. I'll try to figure out to get some representative numbers for its CurrentSize & MaxSize next. Also no privacy on hiding the username for now, until the UI is ready. --- indra/newview/llappviewer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llappviewer.h') diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 8ff07accbe..79db515970 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -253,6 +253,7 @@ public: #ifdef LL_DISCORD static void initDiscordSocial(); static void handleDiscordSocial(bool enable); + static void updateDiscordActivity(); #endif protected: -- cgit v1.2.3