Fix for 47838
[apps/osp/Gallery.git] / src / GlAlbumListPresentationModel.cpp
index f3306a1..7cd26e6 100644 (file)
@@ -80,6 +80,7 @@ static const String RESERVED_CAMERA_PATH = Environment::GetMediaPath() + L"Camer
 static const String RESERVED_CAMERA_PATH_EXT = Environment::GetExternalStoragePath() + L"Camera";
 static const String RESERVED_DOWNLOAD_PATH = Environment::GetMediaPath() + L"Downloads";
 static const String CONTENT_INFO_ORDER = L"ContentFileName";
+static const String DATE_TIME = L"DateTime";
 
 static const int FORMAT_BUFFER_SIZE = 256;
 
@@ -875,8 +876,10 @@ AlbumListPresentationModel::GetContentIdListInDirectoryN(const String& directory
 
        int pageNo = 1;
        int countPerPage = directory.GetContentDirectoryItemCount(contentDirectoryPath);
+
        IList* pContentInfoList = directory.GetContentDirectoryItemListN(contentDirectoryPath, pageNo, countPerPage,
-                       CONTENT_INFO_ORDER, SORT_ORDER_ASCENDING);
+                       DATE_TIME, SORT_ORDER_DESCENDING);
+
        IList* pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
 
        if ((pContentInfoList != null) && (pContentInfoList->GetCount() > 0))