Update radar notes column immediately when notes on an avatar's profile were edited.
parent
f499f0805f
commit
9ba81d7299
|
|
@ -1066,3 +1066,12 @@ void FSRadar::updateAgeAlertCheck()
|
|||
it->second->checkAge();
|
||||
}
|
||||
}
|
||||
|
||||
void FSRadar::updateNotes(const LLUUID& avatar_id, const std::string& notes)
|
||||
{
|
||||
FSRadarEntry* entry = getEntry(avatar_id);
|
||||
if (entry)
|
||||
{
|
||||
entry->setNotes(notes);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ public:
|
|||
void requestRadarChannelAlertSync();
|
||||
void updateNames();
|
||||
void updateName(const LLUUID& avatar_id);
|
||||
void updateNotes(const LLUUID& avatar_id, const std::string& notes);
|
||||
|
||||
static void onRadarNameFmtClicked(const LLSD& userdata);
|
||||
static bool radarNameFmtCheck(const LLSD& userdata);
|
||||
|
|
|
|||
|
|
@ -126,8 +126,7 @@ void FSRadarEntry::processProperties(void* data, EAvatarProcessorType type)
|
|||
LLAvatarNotes* avatar_notes = static_cast<LLAvatarNotes*>(data);
|
||||
if (avatar_notes && avatar_notes->agent_id == gAgentID && avatar_notes->target_id == mID && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
mNotes = avatar_notes->notes;
|
||||
LLStringUtil::trim(mNotes);
|
||||
setNotes(avatar_notes->notes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -191,3 +190,9 @@ void FSRadarEntry::checkAge()
|
|||
mAgeAlertPerformed = true;
|
||||
}
|
||||
}
|
||||
|
||||
void FSRadarEntry::setNotes(const std::string& notes)
|
||||
{
|
||||
mNotes = notes;
|
||||
LLStringUtil::trim(mNotes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ public:
|
|||
|
||||
static std::string getRadarName(const LLAvatarName& av_name);
|
||||
|
||||
void setNotes(const std::string& notes);
|
||||
|
||||
private:
|
||||
void updateName();
|
||||
void onAvatarNameCache(const LLUUID& av_id, const LLAvatarName& av_name);
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@
|
|||
#include "llviewernetwork.h" // <FS:Beq> For LLGridManager
|
||||
|
||||
#include "fsdata.h"
|
||||
#include "fsradar.h" // <FS:Zi> Update notes in radar when edited
|
||||
#include "llviewermenu.h"
|
||||
|
||||
static LLPanelInjector<LLPanelProfileSecondLife> t_panel_profile_secondlife("panel_profile_secondlife");
|
||||
|
|
@ -3145,6 +3146,8 @@ void LLPanelProfileNotes::onSaveNotesChanges()
|
|||
LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL;
|
||||
}
|
||||
|
||||
FSRadar::getInstance()->updateNotes(getAvatarId(), mCurrentNotes); // <FS:Zi> Update notes in radar when edited
|
||||
|
||||
mSaveChanges->setEnabled(FALSE);
|
||||
mDiscardChanges->setEnabled(FALSE);
|
||||
mHasUnsavedChanges = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue