equal
deleted
inserted
replaced
219 // --------------------------------------------------------------------------- |
219 // --------------------------------------------------------------------------- |
220 // |
220 // |
221 EXPORT_C void CMPXCollectionOpenUtility::SetDirection( TDirection aDirection ) |
221 EXPORT_C void CMPXCollectionOpenUtility::SetDirection( TDirection aDirection ) |
222 { |
222 { |
223 iFetchDirection = aDirection; |
223 iFetchDirection = aDirection; |
224 |
224 |
225 if( iFetchStep == EFetchItems || iFetchStep == EFetchCommand || iFetchStep == EFetchCount ) |
225 if( iFetchStep == EFetchItems || iFetchStep == EFetchCommand ) |
226 { |
226 { |
227 TBool skipFirst = iFetchStep == EFetchCommand ? ETrue : EFalse; |
227 TBool skipFirst = iFetchStep == EFetchCommand ? ETrue : EFalse; |
228 |
228 |
229 if( iFetchDirection == EFetchDown ) |
229 if( iFetchDirection == EFetchDown ) |
230 { |
230 { |
600 TInt aError ) |
600 TInt aError ) |
601 { |
601 { |
602 MPX_DEBUG1("CMPXCollectionOpenUtility::DoHandleFetchItemsL <---" ); |
602 MPX_DEBUG1("CMPXCollectionOpenUtility::DoHandleFetchItemsL <---" ); |
603 // Task is done, and compact the list |
603 // Task is done, and compact the list |
604 // |
604 // |
|
605 TInt curOffset(0); |
605 if( iIncrementalChunks.Count() ) |
606 if( iIncrementalChunks.Count() ) |
606 { |
607 { |
|
608 curOffset = iIncrementalChunks[0].iOffset; |
607 iIncrementalChunks.Remove(0); |
609 iIncrementalChunks.Remove(0); |
608 DoCompactTaskListL( aEntries ); |
610 DoCompactTaskListL( aEntries ); |
609 } |
611 } |
610 else |
612 else |
611 { |
613 { |
647 { |
649 { |
648 // All done |
650 // All done |
649 iFetchStep = EFetchNone; |
651 iFetchStep = EFetchNone; |
650 } |
652 } |
651 |
653 |
652 // Callback to observer |
654 // Callback to observer with some treshold to avoid over redrawing |
|
655 // Playlists need every handle open to update the path |
653 // |
656 // |
654 if( iObs ) |
657 if( iObs && |
|
658 (Abs<TInt>(aIndex-curOffset) < iFetchInfo.iSize || |
|
659 iFirstOpen || iMode == KMcModePlaylist || complete ) ) |
655 { |
660 { |
656 iFirstOpen = EFalse; |
661 iFirstOpen = EFalse; |
657 MPX_DEBUG1("CMPXCollectionOpenUtility::DoHandleFetchItemsL callback" ); |
662 MPX_DEBUG1("CMPXCollectionOpenUtility::DoHandleFetchItemsL callback" ); |
658 iObs->HandleOpenL( aEntries, aIndex, complete, aError ); |
663 iObs->HandleOpenL( aEntries, aIndex, complete, aError ); |
659 } |
664 } |