65 |
65 |
66 #include "glxdatasourcemds.h" |
66 #include "glxdatasourcemds.h" |
67 #include "glxdatasourcemds.hrh" |
67 #include "glxdatasourcemds.hrh" |
68 #include "glxdatasourcemdsutility.h" |
68 #include "glxdatasourcemdsutility.h" |
69 |
69 |
|
70 // CONSTANTS |
|
71 const TInt KGlxCameraAlbumPromotionPosition = 0; |
|
72 const TInt KGlxfavoritesAlbumPromotionPosition = 1; |
70 |
73 |
71 _LIT(KPropertyDefNameCreationDate, "CreationDate"); |
74 _LIT(KPropertyDefNameCreationDate, "CreationDate"); |
72 |
75 |
73 // ---------------------------------------------------------------------------- |
76 // ---------------------------------------------------------------------------- |
74 // Constructor |
77 // Constructor |
305 TRACER("CGlxDataSourceTaskMdeIdList::PostFilterL()") |
308 TRACER("CGlxDataSourceTaskMdeIdList::PostFilterL()") |
306 |
309 |
307 if( aFilterProperties.iPromoteSystemItems ) |
310 if( aFilterProperties.iPromoteSystemItems ) |
308 { |
311 { |
309 RArray<TGlxMediaId> list = aFilteredList; |
312 RArray<TGlxMediaId> list = aFilteredList; |
310 /* |
313 // Here we don't have to push list in cleanup stack as caller function, |
311 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
314 // CGlxDataSourceTaskMdeIdList::DoHandleListQueryCompletedL is already |
312 if( KErrNotFound != favoritesIndex ) |
315 // doing that. |
|
316 TInt cameraAlbumIndex = list.Find(DataSource()->CameraAlbumId()); |
|
317 |
|
318 // If Camera Index is not KErrNotFound, 1st Album should be Captured and |
|
319 // 2nd should be Favourites(In Albums List View) |
|
320 |
|
321 if( KErrNotFound != cameraAlbumIndex ) |
|
322 { |
|
323 list.Remove(cameraAlbumIndex); |
|
324 list.InsertL(DataSource()->CameraAlbumId(), KGlxCameraAlbumPromotionPosition); |
|
325 |
|
326 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
|
327 if( KErrNotFound != favoritesIndex ) |
|
328 { |
|
329 list.Remove(favoritesIndex); |
|
330 list.InsertL(DataSource()->FavoritesId(),KGlxfavoritesAlbumPromotionPosition); |
|
331 } |
|
332 } |
|
333 else |
313 { |
334 { |
314 list.Remove(favoritesIndex); |
335 // In Selection popup, 1st item should be Favourites(from grid view/fullscreen view |
315 list.Insert(DataSource()->FavoritesId(), KGlxAlbumPromotionPosition); |
336 // and Camera post captured mode) |
|
337 |
|
338 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
|
339 if( KErrNotFound != favoritesIndex ) |
|
340 { |
|
341 list.Remove(favoritesIndex); |
|
342 list.InsertL(DataSource()->FavoritesId(),KGlxfavoritesAlbumPromotionPosition - 1); |
|
343 } |
316 } |
344 } |
317 */ |
345 |
318 DoPostFilterComplete(list, KErrNone); |
346 DoPostFilterComplete(list, KErrNone); |
319 } |
347 } |
320 else |
348 else |
321 { |
349 { |
322 DoPostFilterComplete(aFilteredList, KErrNone); |
350 DoPostFilterComplete(aFilteredList, KErrNone); |