From d4fd72e5acefddc43b20564e2f11e6ca548a5948 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Thu, 23 Oct 2025 16:33:22 +0200 Subject: [PATCH] Add an option o disable auto-completion when typing @ mentions in chat --- indra/llui/llchatmentionhelper.cpp | 7 +++++++ indra/llui/llemojihelper.cpp | 2 +- indra/newview/app_settings/settings.xml | 11 +++++++++++ .../skins/default/xui/en/panel_preferences_chat.xml | 8 ++++++++ .../skins/default/xui/pl/panel_preferences_chat.xml | 1 + 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/indra/llui/llchatmentionhelper.cpp b/indra/llui/llchatmentionhelper.cpp index 5745389a58..d7cf60daef 100644 --- a/indra/llui/llchatmentionhelper.cpp +++ b/indra/llui/llchatmentionhelper.cpp @@ -39,6 +39,13 @@ bool LLChatMentionHelper::isActive(const LLUICtrl* ctrl) const bool LLChatMentionHelper::isCursorInNameMention(const LLWString& wtext, S32 cursor_pos, S32* mention_start_pos) const { + // Enable auto-completion of @ mentions + static LLUICachedControl useMentionAutoComplete("FSUseChatMentionAutoComplete", true); + if (!useMentionAutoComplete) + { + return false; + } + // if (cursor_pos <= 0 || cursor_pos > static_cast(wtext.size())) return false; diff --git a/indra/llui/llemojihelper.cpp b/indra/llui/llemojihelper.cpp index 7d5be5f049..3367eb0f0a 100644 --- a/indra/llui/llemojihelper.cpp +++ b/indra/llui/llemojihelper.cpp @@ -58,7 +58,7 @@ bool LLEmojiHelper::isActive(const LLUICtrl* ctrl_p) const bool LLEmojiHelper::isCursorInEmojiCode(const LLWString& wtext, S32 cursorPos, S32* pShortCodePos) { // FIRE-33735: Option to suppress emoji chooser window from automatically popping up while typing in chat bars - static LLUICachedControl FSEnableEmojiWindowPopupWhileTyping("FSEnableEmojiWindowPopupWhileTyping"); + static LLUICachedControl FSEnableEmojiWindowPopupWhileTyping("FSEnableEmojiWindowPopupWhileTyping", true); if (!FSEnableEmojiWindowPopupWhileTyping) { return false; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 407b57c184..73effa26aa 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26469,6 +26469,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + FSUseChatMentionAutoComplete + + Comment + Enable auto-completion when typing @ mentions in chat. + Persist + 1 + Type + Boolean + Value + 1 + FSUseBWEmojis Comment diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 27137d2c16..2e88b99ba4 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -916,6 +916,14 @@ top_pad="1" height="16" width="400" /> + +