67 #include "glxdatasourcemds.h" |
67 #include "glxdatasourcemds.h" |
68 #include "glxdatasourcemds.hrh" |
68 #include "glxdatasourcemds.hrh" |
69 #include "glxdatasourcemdsutility.h" |
69 #include "glxdatasourcemdsutility.h" |
70 |
70 |
71 // CONSTANTS |
71 // CONSTANTS |
72 //const TInt KGlxAlbumPromotionPosition = 0; |
72 const TInt KGlxCameraAlbumPromotionPosition = 0; |
|
73 const TInt KGlxfavoritesAlbumPromotionPosition = 1; |
73 |
74 |
74 _LIT(KPropertyDefNameCreationDate, "CreationDate"); |
75 _LIT(KPropertyDefNameCreationDate, "CreationDate"); |
75 |
76 |
76 // ---------------------------------------------------------------------------- |
77 // ---------------------------------------------------------------------------- |
77 // Constructor |
78 // Constructor |
256 if( KErrNotFound == timeIndex ) |
257 if( KErrNotFound == timeIndex ) |
257 { |
258 { |
258 User::Leave(KErrCorrupt); |
259 User::Leave(KErrCorrupt); |
259 } |
260 } |
260 currentMonth = static_cast<CMdETimeProperty*>(time)->Value(); |
261 currentMonth = static_cast<CMdETimeProperty*>(time)->Value(); |
261 if( !DataSource()->SameMonth(lastMonth, currentMonth) ) |
262 |
|
263 // Also Checking for a Valid Month Entry Based on a Year Greater than 0000. |
|
264 if( !DataSource()->SameMonth(lastMonth, currentMonth) && (currentMonth.DateTime().Year() > 0) ) |
262 { |
265 { |
263 const TGlxMediaId monthId = DataSource()->GetMonthIdL(currentMonth); |
266 const TGlxMediaId monthId = DataSource()->GetMonthIdL(currentMonth); |
264 monthList.AppendL(monthId); |
267 monthList.AppendL(monthId); |
265 lastMonth = currentMonth; |
268 lastMonth = currentMonth; |
266 } |
269 } |
295 TRACER("CGlxDataSourceTaskMdeIdList::PostFilterL()") |
298 TRACER("CGlxDataSourceTaskMdeIdList::PostFilterL()") |
296 |
299 |
297 if( aFilterProperties.iPromoteSystemItems ) |
300 if( aFilterProperties.iPromoteSystemItems ) |
298 { |
301 { |
299 RArray<TGlxMediaId> list = aFilteredList; |
302 RArray<TGlxMediaId> list = aFilteredList; |
300 /* |
303 TInt cameraAlbumIndex = list.Find(DataSource()->CameraAlbumId()); |
301 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
304 |
302 if( KErrNotFound != favoritesIndex ) |
305 // If Camera Index is not KErrNotFound, 1st Album should be Captured and |
|
306 // 2nd should be Favourites(In Albums List View) |
|
307 |
|
308 if( KErrNotFound != cameraAlbumIndex ) |
|
309 { |
|
310 list.Remove(cameraAlbumIndex); |
|
311 list.Insert(DataSource()->CameraAlbumId(), KGlxCameraAlbumPromotionPosition); |
|
312 |
|
313 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
|
314 if( KErrNotFound != favoritesIndex ) |
|
315 { |
|
316 list.Remove(favoritesIndex); |
|
317 list.Insert(DataSource()->FavoritesId(),KGlxfavoritesAlbumPromotionPosition); |
|
318 } |
|
319 } |
|
320 else |
303 { |
321 { |
304 list.Remove(favoritesIndex); |
322 // In Selection popup, 1st item should be Favourites(from grid view/fullscreen view |
305 list.Insert(DataSource()->FavoritesId(), KGlxAlbumPromotionPosition); |
323 // and Camera post captured mode) |
|
324 |
|
325 TInt favoritesIndex = list.Find(DataSource()->FavoritesId()); |
|
326 if( KErrNotFound != favoritesIndex ) |
|
327 { |
|
328 list.Remove(favoritesIndex); |
|
329 list.Insert(DataSource()->FavoritesId(),KGlxfavoritesAlbumPromotionPosition - 1); |
|
330 } |
306 } |
331 } |
307 */ |
332 |
308 DoPostFilterComplete(list, KErrNone); |
333 DoPostFilterComplete(list, KErrNone); |
309 } |
334 } |
310 else |
335 else |
311 { |
336 { |
312 DoPostFilterComplete(aFilteredList, KErrNone); |
337 DoPostFilterComplete(aFilteredList, KErrNone); |