From dccf087d652ecf98d24927a397c38cc0c9db3ab4 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 27 Jul 2025 14:26:47 +0800 Subject: Move Discord-related code to llappviewer.cpp The doFrame is the one called over and over again, so running the Discord callbacks from there shouldn't have one extra function overhead, while running the Discord initialisation is only once so it's much more okay to have the extra function overhead there. --- indra/newview/llviewermenu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 4383fc87e5..2c022d0a4c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -144,6 +144,7 @@ #include "llwindow.h" #include "llpathfindingmanager.h" #include "llstartup.h" +#include "llappviewer.h" #include "boost/unordered_map.hpp" #include #include @@ -8945,7 +8946,7 @@ void handle_report_bug(const LLSD& param) #ifdef LL_DISCORD void handle_discord_social(const LLSD& param) { - LLStartUp::handleDiscordSocial(); + LLAppViewer::handleDiscordSocial(); } #endif -- cgit v1.2.3 From ec86ee28171428824cde4afe88d1165e80633233 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 27 Jul 2025 22:38:14 +0800 Subject: Connect to Discord now through privacy tab Now the access token is saved the way passwords are saved, but without a username, so we can have some persistence without having to implement an OAuth2 backend server cause we would have to store those tokens there anyway still and that would even require more disclosure that the user token gets saved on a server, and it's just simpler to not go that way. Discord Social SDK doesn't have to have a helper for sending code to a custom server anyway, that we would have to have some asynchronous HTTP requestor ready. Show location check button gets enabled only when Discord integration is enabled, though it's not functioning yet. --- indra/newview/llviewermenu.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2c022d0a4c..810ebd90a5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8943,13 +8943,6 @@ void handle_report_bug(const LLSD& param) LLWeb::loadURLExternal(url); } -#ifdef LL_DISCORD -void handle_discord_social(const LLSD& param) -{ - LLAppViewer::handleDiscordSocial(); -} -#endif - void handle_buy_currency_test() { std::string url = @@ -9928,9 +9921,6 @@ void initialize_menus() commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2)); // this one opens the Web Content floater commit.add("Advanced.ShowURL", boost::bind(&handle_show_url, _2)); commit.add("Advanced.ReportBug", boost::bind(&handle_report_bug, _2)); -#ifdef LL_DISCORD - commit.add("Advanced.DiscordSocial", boost::bind(&handle_discord_social, _2)); -#endif view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest"); view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); -- cgit v1.2.3