--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideoscategories.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideoscategories.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -256,7 +256,8 @@
}
// Update videos counts
- UpdateVideosCountL( *categoryArray, videosIncrements, newVideosIncrements );
+ UpdateVideosCountL( *categoryArray, videosIncrements,
+ newVideosIncrements, !aNewItemsStartIndex );
CleanupStack::PopAndDestroy( &newVideosIncrements ); // <-1
CleanupStack::PopAndDestroy( &videosIncrements ); // <-1
@@ -267,7 +268,8 @@
// ----------------------------------------------------------------------------
//
void CVcxMyVideosCategories::UpdateVideosCountL( CMPXMediaArray& aCategoryArray,
- RArray<TInt>& aVideosIncrements, RArray<TInt>& aNewVideosIncrements )
+ RArray<TInt>& aVideosIncrements, RArray<TInt>& aNewVideosIncrements,
+ TBool aForceUpdate )
{
TBool modified = EFalse;
TInt categoryCount = aCategoryArray.Count();
@@ -275,7 +277,7 @@
for ( TInt i = 0; i < categoryCount; i++ )
{
- if ( aVideosIncrements[i] != 0 )
+ if ( aForceUpdate || aVideosIncrements[i] != 0 )
{
category = aCategoryArray.AtL( i );
@@ -287,7 +289,7 @@
}
//codescanner warning: aNewVideosIncrements count is same as aCategoryArray count, so the range is checked
- if ( aNewVideosIncrements[i] != 0 )
+ if ( aForceUpdate || aNewVideosIncrements[i] != 0 )
{
category = aCategoryArray.AtL( i );
@@ -314,10 +316,9 @@
if ( aIncrement != 0 )
{
AddToTUint32AttributeL( aCategory, aIncrement, aCountAttribute );
-
- iCollection.iMessageList->AddEventL( aCategory.ValueTObjectL<TMPXItemId>(
- KMPXMediaGeneralId ), EMPXItemModified, aEventInfo );
}
+ iCollection.iMessageList->AddEventL( aCategory.ValueTObjectL<TMPXItemId>(
+ KMPXMediaGeneralId ), EMPXItemModified, aEventInfo );
}
// ----------------------------------------------------------------------------