equal
deleted
inserted
replaced
292 // CVcxMyVideosAlbum::CalculateAttributesL |
292 // CVcxMyVideosAlbum::CalculateAttributesL |
293 // --------------------------------------------------------------------------- |
293 // --------------------------------------------------------------------------- |
294 // |
294 // |
295 void CVcxMyVideosAlbum::CalculateAttributesL( TInt aStartIndex ) |
295 void CVcxMyVideosAlbum::CalculateAttributesL( TInt aStartIndex ) |
296 { |
296 { |
|
297 TInt videoCount = 0; |
297 TUint32 count = iVideoList.Count(); |
298 TUint32 count = iVideoList.Count(); |
298 iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryItemCount, count ); |
|
299 TInt newCount = 0; |
299 TInt newCount = 0; |
300 CMPXMedia* video; |
300 CMPXMedia* video; |
301 CMPXMedia* latestNewVideo = NULL; |
301 CMPXMedia* latestNewVideo = NULL; |
302 TInt pos; |
302 TInt pos; |
303 TUint32 flags; |
303 TUint32 flags; |
306 for ( TInt i = aStartIndex; i < count; i++ ) |
306 for ( TInt i = aStartIndex; i < count; i++ ) |
307 { |
307 { |
308 video = iCollection.iCache->FindVideoByMdsIdL( iVideoList[i].iMdsId, pos ); |
308 video = iCollection.iCache->FindVideoByMdsIdL( iVideoList[i].iMdsId, pos ); |
309 if ( video ) |
309 if ( video ) |
310 { |
310 { |
|
311 videoCount++; |
311 flags = TVcxMyVideosCollectionUtil::FlagsL( *video ); |
312 flags = TVcxMyVideosCollectionUtil::FlagsL( *video ); |
312 if ( flags & EVcxMyVideosVideoNew ) |
313 if ( flags & EVcxMyVideosVideoNew ) |
313 { |
314 { |
314 newCount++; |
315 newCount++; |
315 currentItemsCreationDate = TVcxMyVideosCollectionUtil::CreationDateL( *video ); |
316 currentItemsCreationDate = TVcxMyVideosCollectionUtil::CreationDateL( *video ); |
319 latestNewVideo = video; |
320 latestNewVideo = video; |
320 } |
321 } |
321 } |
322 } |
322 } |
323 } |
323 } |
324 } |
324 iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryItemCount, count ); |
325 iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryItemCount, videoCount ); |
325 iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryNewItemCount, newCount ); |
326 iMedia->SetTObjectValueL<TUint32>( KVcxMediaMyVideosCategoryNewItemCount, newCount ); |
326 if ( latestNewVideo ) |
327 if ( latestNewVideo ) |
327 { |
328 { |
328 iMedia->SetTextValueL( KVcxMediaMyVideosCategoryNewItemName, |
329 iMedia->SetTextValueL( KVcxMediaMyVideosCategoryNewItemName, |
329 TVcxMyVideosCollectionUtil::Title( *latestNewVideo ) ); |
330 TVcxMyVideosCollectionUtil::Title( *latestNewVideo ) ); |