224 PackAndNotifyEventL(EIMOperationUnreadChange, sericeId, iActiveHeader , NULL ); |
224 PackAndNotifyEventL(EIMOperationUnreadChange, sericeId, iActiveHeader , NULL ); |
225 // once request is completed, mark as fetch completed |
225 // once request is completed, mark as fetch completed |
226 } |
226 } |
227 // if there are no unread messages then reset the status pane indicator. |
227 // if there are no unread messages then reset the status pane indicator. |
228 TInt unreadCount = 0; |
228 TInt unreadCount = 0; |
|
229 TInt currentContactUnReadCount = 0; |
229 TInt headerCount = iHeaderArray.Count(); |
230 TInt headerCount = iHeaderArray.Count(); |
|
231 TInt id = 0; |
230 for( TInt i=0; i< headerCount; i++ ) |
232 for( TInt i=0; i< headerCount; i++ ) |
231 { |
233 { |
232 // note in this case reciepient is own user id |
234 // note in this case reciepient is own user id |
233 MIMCacheMessageHeader* header = iHeaderArray[i]; |
235 MIMCacheMessageHeader* header = iHeaderArray[i]; |
234 if( header->ServiceId() == sericeId ) |
236 if( header->ServiceId() == sericeId ) |
235 { |
237 { |
236 unreadCount = unreadCount + header->UnreadMessageCount(); |
238 if(buddyId->Compare(iHeaderArray[i]->BuddyId()) == 0) |
237 } |
239 { |
238 } |
240 currentContactUnReadCount = header->UnreadMessageCount(); |
239 //BugFix:ESLM-83TF7K: Unread messages are not updated to universal indicator. |
241 } |
240 // if(!unreadCount) |
242 if(header->UnreadMessageCount()) |
241 // { |
243 { |
242 PublishMessageInfoL(*buddyId,sericeId); |
244 id = i; |
243 // } |
245 } |
|
246 |
|
247 } |
|
248 } |
|
249 |
|
250 if(!currentContactUnReadCount) |
|
251 { |
|
252 PublishMessageInfoL(iHeaderArray[id]->BuddyId(),sericeId); |
|
253 } |
244 |
254 |
245 CleanupStack::PopAndDestroy(buddyId); |
255 CleanupStack::PopAndDestroy(buddyId); |
246 |
256 |
247 TRACE( T_LIT( "CCacheServerActiveHelper::StartNewConversationL end") ); |
257 TRACE( T_LIT( "CCacheServerActiveHelper::StartNewConversationL end") ); |
248 } |
258 } |