summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationmodel.h
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-09-21 18:12:06 -0700
committerMerov Linden <merov@lindenlab.com>2012-09-21 18:12:06 -0700
commitb5583906d0cce652f456851732db5b1c19659662 (patch)
tree3010a34c70a5ed88900b21738207f3a2f756d668 /indra/newview/llconversationmodel.h
parentfc6bbee3f4ba1abba2956ee92f7ac7ba01d0f59b (diff)
CHUI-340 : WIP : Fix sorting bugs on time for sessions, simplified the update time mechanism and clean up
Diffstat (limited to 'indra/newview/llconversationmodel.h')
-rwxr-xr-xindra/newview/llconversationmodel.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index e2c88785a2..e67aeb9aca 100755
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -106,7 +106,7 @@ public:
// Methods used in sorting (see LLConversationSort::operator())
EConversationType const getType() const { return mConvType; }
- virtual const bool getTime(F64& time) const { return false; }
+ virtual const bool getTime(F64& time) const { time = mLastActiveTime; return (time > 0.1); }
virtual const bool getDistanceToAgent(F32& distance) const { return false; }
// This method will be called to determine if a drop can be
@@ -129,6 +129,7 @@ protected:
LLUUID mUUID; // UUID of the session or the participant
EConversationType mConvType; // Type of conversation item
bool mNeedsRefresh; // Flag signaling to the view that something changed for this item
+ F64 mLastActiveTime;
};
class LLConversationItemSession : public LLConversationItem
@@ -149,7 +150,7 @@ public:
void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted);
void setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator);
- void setParticipantTimeNow(const LLUUID& participant_id);
+ void setTimeNow(const LLUUID& participant_id);
bool isLoaded() { return mIsLoaded; }
@@ -172,18 +173,15 @@ public:
bool isModerator() {return mIsModerator; }
void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; }
void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; }
- void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); }
+ void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); mNeedsRefresh = true; }
void onAvatarNameCache(const LLAvatarName& av_name);
- virtual const bool getTime(F64& time) const { time = mLastActiveTime; return (time > 0.1 ? true : false); }
-
void dumpDebugData();
private:
bool mIsMuted; // default is false
bool mIsModerator; // default is false
- F64 mLastActiveTime;
};
// We don't want to ever filter conversations but we need to declare that class to create a conversation view model.