From 2f9cc80c2e0a6ca648871ed74cc10b813d2c4940 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 5 Mar 2010 17:53:32 +0200 Subject: =?UTF-8?q?fixed=20EXT-5910=20=E2=80=9COffers=20logging=E2=80=9D,?= =?UTF-8?q?=20fixed=20IM=20message=20counter=20when=20received=20interacti?= =?UTF-8?q?ve=20notification(offer);=20corrected=20logging=20to=20file=20o?= =?UTF-8?q?f=20offer=20notification;=20enabled=20logging=20for=20FRIENDSHI?= =?UTF-8?q?P=5FACCEPTED=20notification;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b3f085ef6d..9ea8364491 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -723,7 +723,9 @@ LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, session->mNumUnread++; //update count of unread messages from real participant - if (!(from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from)) + if (!(from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) + // we should increment counter for interactive system messages() + || INTERACTIVE_SYSTEM_FROM == from) { ++(session->mParticipantUnreadMessageCount); } -- cgit v1.2.3 From 33133d4d7c5ee060dfbd6cb03fe50d8da0235146 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 9 Mar 2010 14:05:09 +0200 Subject: =?UTF-8?q?fixed=20EXT-5910=20=E2=80=9COffers=20logging=E2=80=9D,?= =?UTF-8?q?=20replaced=20interactive=20system=20message=20marker=20with=20?= =?UTF-8?q?correct=20from=20string=20value;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimview.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 9ea8364491..6ce06adc80 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -717,8 +717,15 @@ LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, return NULL; } - addToHistory(session_id, from, from_id, utf8_text); - if (log2file) logToFile(session_id, from, from_id, utf8_text); + // replace interactive system message marker with correct from string value + std::string from_name = from; + if (INTERACTIVE_SYSTEM_FROM == from) + { + from_name = SYSTEM_FROM; + } + + addToHistory(session_id, from_name, from_id, utf8_text); + if (log2file) logToFile(session_id, from_name, from_id, utf8_text); session->mNumUnread++; -- cgit v1.2.3 From 2d0ca224ea7a05a38e51979d201e55b7e942c855 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 19 Mar 2010 17:27:54 +0200 Subject: =?UTF-8?q?fixed=20EXT-6472=20=E2=80=9CNo=20indication=20about=20n?= =?UTF-8?q?ew=20message/offer=20if=20IM=20window=20is=20open=20but=20not?= =?UTF-8?q?=20in=20focus=E2=80=9D,=20allowed=20to=20increment=20IM=20messa?= =?UTF-8?q?ge=20counter=20when=20IM=20window=20is=20opened=20but=20doesn't?= =?UTF-8?q?=20have=20focus=20and=20reset=20IM=20counter=20when=20IM=20wind?= =?UTF-8?q?ow=20get=20focus;=20reviewed=20by=20Mike=20Antipov=20at=20https?= =?UTF-8?q?://codereview.productengine.com/secondlife/r/76/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimview.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6ce06adc80..7a4febec20 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -608,10 +608,10 @@ bool LLIMModel::clearSession(const LLUUID& session_id) return true; } -void LLIMModel::getMessages(const LLUUID& session_id, std::list& messages, int start_index) +void LLIMModel::getMessagesSilently(const LLUUID& session_id, std::list& messages, int start_index) { LLIMSession* session = findIMSession(session_id); - if (!session) + if (!session) { llwarns << "session " << session_id << "does not exist " << llendl; return; @@ -619,7 +619,7 @@ void LLIMModel::getMessages(const LLUUID& session_id, std::list& messages, int i = session->mMsgs.size() - start_index; - for (std::list::iterator iter = session->mMsgs.begin(); + for (std::list::iterator iter = session->mMsgs.begin(); iter != session->mMsgs.end() && i > 0; iter++) { @@ -628,6 +628,16 @@ void LLIMModel::getMessages(const LLUUID& session_id, std::list& messages, messages.push_back(*iter); i--; } +} + +void LLIMModel::sendNoUnreadMessages(const LLUUID& session_id) +{ + LLIMSession* session = findIMSession(session_id); + if (!session) + { + llwarns << "session " << session_id << "does not exist " << llendl; + return; + } session->mNumUnread = 0; session->mParticipantUnreadMessageCount = 0; @@ -639,6 +649,13 @@ void LLIMModel::getMessages(const LLUUID& session_id, std::list& messages, mNoUnreadMsgsSignal(arg); } +void LLIMModel::getMessages(const LLUUID& session_id, std::list& messages, int start_index) +{ + getMessagesSilently(session_id, messages, start_index); + + sendNoUnreadMessages(session_id); +} + bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { LLIMSession* session = findIMSession(session_id); -- cgit v1.2.3