# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277125278 -10800 # Node ID 2ca0d29c17c43429d7290fc2ac378396b6063df0 # Parent cfe5eb8bb9ca45e24a2af23911f6b1f24c7dc20f Revision: 201023 Kit: 2010125 diff -r cfe5eb8bb9ca -r 2ca0d29c17c4 imservices/instantmessagingcache/imcacheserver/src/ccacheserveractivehelper.cpp --- a/imservices/instantmessagingcache/imcacheserver/src/ccacheserveractivehelper.cpp Wed Jun 09 10:02:05 2010 +0300 +++ b/imservices/instantmessagingcache/imcacheserver/src/ccacheserveractivehelper.cpp Mon Jun 21 16:01:18 2010 +0300 @@ -226,21 +226,31 @@ } // if there are no unread messages then reset the status pane indicator. TInt unreadCount = 0; + TInt currentContactUnReadCount = 0; TInt headerCount = iHeaderArray.Count(); + TInt id = 0; for( TInt i=0; i< headerCount; i++ ) { // note in this case reciepient is own user id MIMCacheMessageHeader* header = iHeaderArray[i]; if( header->ServiceId() == sericeId ) { - unreadCount = unreadCount + header->UnreadMessageCount(); + if(buddyId->Compare(iHeaderArray[i]->BuddyId()) == 0) + { + currentContactUnReadCount = header->UnreadMessageCount(); + } + if(header->UnreadMessageCount()) + { + id = i; + } + } } - //BugFix:ESLM-83TF7K: Unread messages are not updated to universal indicator. -// if(!unreadCount) -// { - PublishMessageInfoL(*buddyId,sericeId); -// } + + if(!currentContactUnReadCount) + { + PublishMessageInfoL(iHeaderArray[id]->BuddyId(),sericeId); + } CleanupStack::PopAndDestroy(buddyId); diff -r cfe5eb8bb9ca -r 2ca0d29c17c4 imservices/instantmessagingcache/imcacheserver/src/cimcachesession.cpp --- a/imservices/instantmessagingcache/imcacheserver/src/cimcachesession.cpp Wed Jun 09 10:02:05 2010 +0300 +++ b/imservices/instantmessagingcache/imcacheserver/src/cimcachesession.cpp Mon Jun 21 16:01:18 2010 +0300 @@ -241,7 +241,14 @@ if( iPacketsArray.Count() ) { CIMCacheBufferArray* packet = iPacketsArray[ 0 ] ; - iObserverMessage.Complete( packet->OperationCode() ); + if( packet->OperationCode() == EIMOperationFetchAll ) + { + iObserverMessage.Complete( EIMOperationDataAvailable ); + } + else + { + iObserverMessage.Complete( packet->OperationCode() ); + } iObserverActive = EFalse; } @@ -278,7 +285,14 @@ if( iPacketsArray.Count() ) { CIMCacheBufferArray* packet = iPacketsArray[ 0 ] ; - iObserverMessage.Complete( packet->OperationCode() ); + if( packet->OperationCode() == EIMOperationFetchAll ) + { + iObserverMessage.Complete( EIMOperationUnreadChange ); + } + else + { + iObserverMessage.Complete( packet->OperationCode() ); + } iObserverActive = EFalse; } break;