FIRE-479: Bold for Moderators in Group Chat (PhoenixBoldGroupMods) Needs to be added to prefs
parent
e6105ae510
commit
d31c40fbcd
|
|
@ -64,7 +64,8 @@ typedef enum e_chat_style
|
|||
{
|
||||
CHAT_STYLE_NORMAL,
|
||||
CHAT_STYLE_IRC,
|
||||
CHAT_STYLE_HISTORY
|
||||
CHAT_STYLE_HISTORY,
|
||||
CHAT_STYLE_MODERATOR
|
||||
}EChatStyle;
|
||||
|
||||
// A piece of chat
|
||||
|
|
|
|||
|
|
@ -13552,5 +13552,16 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>PhoenixBoldGroupMods</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Boldify moderators' text in group chat</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -833,6 +833,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
style_params.color(LLColor4::grey);
|
||||
style_params.readonly_color(LLColor4::grey);
|
||||
}
|
||||
|
||||
// Bold group moderators' chat -KC
|
||||
if (chat.mChatStyle == CHAT_STYLE_MODERATOR)
|
||||
{
|
||||
style_params.font.style = irc_me ? "ITALICBOLD" : "BOLD";
|
||||
}
|
||||
|
||||
if (use_plain_text_chat_history)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1070,6 +1070,7 @@ void LLIMFloater::sessionInitReplyReceived(const LLUUID& im_session_id)
|
|||
void LLIMFloater::updateMessages()
|
||||
{
|
||||
bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory");
|
||||
bool bold_mods_chat = gSavedSettings.getBOOL("PhoenixBoldGroupMods");
|
||||
|
||||
std::list<LLSD> messages;
|
||||
|
||||
|
|
@ -1087,6 +1088,9 @@ void LLIMFloater::updateMessages()
|
|||
{
|
||||
LLSD chat_args;
|
||||
chat_args["use_plain_text_chat_history"] = use_plain_text_chat_history;
|
||||
|
||||
LLIMModel::LLIMSession* pIMSession = LLIMModel::instance().findIMSession(mSessionID);
|
||||
RLV_ASSERT(pIMSession);
|
||||
|
||||
std::ostringstream message;
|
||||
std::list<LLSD>::const_reverse_iterator iter = messages.rbegin();
|
||||
|
|
@ -1107,6 +1111,16 @@ void LLIMFloater::updateMessages()
|
|||
chat.mFromName = from;
|
||||
chat.mTimeStr = time;
|
||||
chat.mChatStyle = is_history ? CHAT_STYLE_HISTORY : chat.mChatStyle;
|
||||
|
||||
// Bold group moderators' chat -KC
|
||||
if (!is_history && bold_mods_chat && pIMSession && pIMSession->mSpeakers)
|
||||
{
|
||||
LLPointer<LLSpeaker> speakerp = pIMSession->mSpeakers->findSpeaker(from_id);
|
||||
if (speakerp && speakerp->mIsModerator)
|
||||
{
|
||||
chat.mChatStyle = CHAT_STYLE_MODERATOR;
|
||||
}
|
||||
}
|
||||
|
||||
// process offer notification
|
||||
if (msg.has("notification_id"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue