diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-23 20:25:24 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-23 20:25:24 +0800 |
commit | 304377e015100ea38169106956f43993387e8480 (patch) | |
tree | adc9e236c192c3fadf82ae0c069c1d1bcc2ead7a | |
parent | 78c6c73770202cedcc92d4b19bccd4ffe9075bef (diff) |
Arrival/departure notifs header links to profiles
But I haven't been able to make the body message text stay light grey.
It's white now. I've tried changing the chat source, chat type and
chat style (refer to indra/llui/llchat.h) but I couldn't get just
the desired combined styles.
-rw-r--r-- | indra/newview/llvoavatar.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4aafe1b1fb..24e1cd83db 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -814,7 +814,13 @@ LLVOAvatar::~LLVOAvatar() { if (gSavedSettings.getBOOL("IMShowArrivalsDepartures") && !getFullname().empty()) { - LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("%s left.", getFullname().c_str())}, LLSD{}); + LLAvatarName av_name; + LLAvatarNameCache::get(getID(), &av_name); + auto display_name = av_name.getDisplayName(); + LLChat chat{llformat("%s left.", display_name.c_str())}; + chat.mFromName = display_name; + chat.mFromID = getID(); + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, LLSD{}); } if (!mFullyLoaded) { @@ -2478,8 +2484,13 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, { if (*id_it == getID() && !isSelf()) { - LLNotificationsUI::LLNotificationManager::instance() - .onChat(LLChat{llformat("%s arrived (%.1f m).", getFullname().c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}, LLSD{}); + LLAvatarName av_name; + LLAvatarNameCache::get(getID(), &av_name); + auto display_name = av_name.getDisplayName(); + LLChat chat{llformat("%s arrived (%.1f m).", display_name.c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}; + chat.mFromName = display_name; + chat.mFromID = getID(); + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, LLSD{}); break; } } |