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 ) |
225 if( iFetchStep == EFetchItems || iFetchStep == EFetchCommand || iFetchStep == EFetchCount ) |
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); |
|
606 if( iIncrementalChunks.Count() ) |
605 if( iIncrementalChunks.Count() ) |
607 { |
606 { |
608 curOffset = iIncrementalChunks[0].iOffset; |
|
609 iIncrementalChunks.Remove(0); |
607 iIncrementalChunks.Remove(0); |
610 DoCompactTaskListL( aEntries ); |
608 DoCompactTaskListL( aEntries ); |
611 } |
609 } |
612 else |
610 else |
613 { |
611 { |
649 { |
647 { |
650 // All done |
648 // All done |
651 iFetchStep = EFetchNone; |
649 iFetchStep = EFetchNone; |
652 } |
650 } |
653 |
651 |
654 // Callback to observer with some treshold to avoid over redrawing |
652 // Callback to observer |
655 // Playlists need every handle open to update the path |
|
656 // |
653 // |
657 if( iObs && |
654 if( iObs ) |
658 (Abs<TInt>(aIndex-curOffset) < iFetchInfo.iSize || |
|
659 iFirstOpen || iMode == KMcModePlaylist || complete ) ) |
|
660 { |
655 { |
661 iFirstOpen = EFalse; |
656 iFirstOpen = EFalse; |
662 MPX_DEBUG1("CMPXCollectionOpenUtility::DoHandleFetchItemsL callback" ); |
657 MPX_DEBUG1("CMPXCollectionOpenUtility::DoHandleFetchItemsL callback" ); |
663 iObs->HandleOpenL( aEntries, aIndex, complete, aError ); |
658 iObs->HandleOpenL( aEntries, aIndex, complete, aError ); |
664 } |
659 } |