diff options
| author | maxim_productengine <mnikolenko@productengine.com> | 2018-08-23 15:38:04 +0300 |
|---|---|---|
| committer | maxim_productengine <mnikolenko@productengine.com> | 2018-08-23 15:38:04 +0300 |
| commit | c24f638088f3d67ceebe82520787a4d344ebd72f (patch) | |
| tree | b6fdf9b85a8d9baec8da73bc919ebbd6e9a6da3e /indra/newview/llrecentpeople.cpp | |
| parent | cdef4175d4d382f5c4a3caecb0ab319a82ed3a20 (diff) | |
MAINT-8997 Add "Sort by recent arrival" to viewer People / Nearby map and list
Diffstat (limited to 'indra/newview/llrecentpeople.cpp')
| -rw-r--r-- | indra/newview/llrecentpeople.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llrecentpeople.cpp b/indra/newview/llrecentpeople.cpp index 7689cd1a52..8bea9aad47 100644 --- a/indra/newview/llrecentpeople.cpp +++ b/indra/newview/llrecentpeople.cpp @@ -126,3 +126,33 @@ bool LLRecentPeople::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) add(event->getValue().asUUID()); return true; } +
+void LLRecentPeople::updateAvatarsArrivalTime(uuid_vec_t& uuids)
+{
+ id_to_time_map_t buf = mAvatarsArrivalTime;
+ mAvatarsArrivalTime.clear();
+
+ for (uuid_vec_t::const_iterator id_it = uuids.begin(); id_it != uuids.end(); ++id_it)
+ {
+ if (buf.find(*id_it) != buf.end())
+ {
+ mAvatarsArrivalTime[*id_it] = buf[*id_it];
+ }
+ else
+ {
+ mAvatarsArrivalTime[*id_it] = LLDate::now().secondsSinceEpoch();
+ }
+ }
+}
+
+F32 LLRecentPeople::getArrivalTimeByID(const LLUUID& id) +{ + id_to_time_map_t::const_iterator it = mAvatarsArrivalTime.find(id); + + if (it != mAvatarsArrivalTime.end()) + { + return it->second; + } + return LLDate::now().secondsSinceEpoch(); +}
+ |
