241 TRACER("CGlxDataSourceTaskMdeIdList::PostFilterL()") |
241 TRACER("CGlxDataSourceTaskMdeIdList::PostFilterL()") |
242 |
242 |
243 if( aFilterProperties.iPromoteSystemItems ) |
243 if( aFilterProperties.iPromoteSystemItems ) |
244 { |
244 { |
245 RArray<TGlxMediaId> list = aFilteredList; |
245 RArray<TGlxMediaId> list = aFilteredList; |
|
246 // Here we don't have to push list in cleanup stack as caller function, |
|
247 // CGlxDataSourceTaskMdeIdList::DoHandleListQueryCompletedL is already |
|
248 // doing that. |
246 TInt cameraAlbumIndex = list.Find(DataSource()->CameraAlbumId()); |
249 TInt cameraAlbumIndex = list.Find(DataSource()->CameraAlbumId()); |
247 |
250 |
248 // If Camera Index is not KErrNotFound, 1st Album should be Captured and |
251 // If Camera Index is not KErrNotFound, 1st Album should be Captured and |
249 // 2nd should be Favourites(In Albums List View) |
252 // 2nd should be Favourites(In Albums List View) |
250 |
253 |
251 if( KErrNotFound != cameraAlbumIndex ) |
254 if( KErrNotFound != cameraAlbumIndex ) |
252 { |
255 { |
253 list.Remove(cameraAlbumIndex); |
256 list.Remove(cameraAlbumIndex); |
254 list.Insert(DataSource()->CameraAlbumId(), KGlxCameraAlbumPromotionPosition); |
257 list.InsertL(DataSource()->CameraAlbumId(), KGlxCameraAlbumPromotionPosition); |
255 |
258 |
256 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
259 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
257 if( KErrNotFound != favoritesIndex ) |
260 if( KErrNotFound != favoritesIndex ) |
258 { |
261 { |
259 list.Remove(favoritesIndex); |
262 list.Remove(favoritesIndex); |
260 list.Insert(DataSource()->FavoritesId(),KGlxfavoritesAlbumPromotionPosition); |
263 list.InsertL(DataSource()->FavoritesId(),KGlxfavoritesAlbumPromotionPosition); |
261 } |
264 } |
262 } |
265 } |
263 else |
266 else |
264 { |
267 { |
265 // In Selection popup, 1st item should be Favourites(from grid view/fullscreen view |
268 // In Selection popup, 1st item should be Favourites(from grid view/fullscreen view |
267 |
270 |
268 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
271 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
269 if( KErrNotFound != favoritesIndex ) |
272 if( KErrNotFound != favoritesIndex ) |
270 { |
273 { |
271 list.Remove(favoritesIndex); |
274 list.Remove(favoritesIndex); |
272 list.Insert(DataSource()->FavoritesId(),KGlxfavoritesAlbumPromotionPosition - 1); |
275 list.InsertL(DataSource()->FavoritesId(),KGlxfavoritesAlbumPromotionPosition - 1); |
273 } |
276 } |
274 } |
277 } |
275 |
278 |
276 DoPostFilterComplete(list, KErrNone); |
279 DoPostFilterComplete(list, KErrNone); |
277 } |
280 } |