NABI issue 35680 accepted/tizen_2.1/20130425.024242 submit/tizen_2.1/20130424.224243
authorravi.n2 <ravi.n2@samsung.com>
Wed, 24 Apr 2013 09:49:41 +0000 (15:19 +0530)
committerravi.n2 <ravi.n2@samsung.com>
Wed, 24 Apr 2013 09:49:41 +0000 (15:19 +0530)
Change-Id: I43c4c201cf5b871fc1f66e401863344b0892a828

src/MfBaseItemProvider.cpp
src/MfFolderEntryPresentationModel.cpp

index 91a1a08..61bf109 100644 (file)
@@ -332,7 +332,6 @@ BaseItemProvider::CreateNormalListViewItem(int listItemIndex, int listItemWidth)
        AppRegistry* pAppRegistry = null;
        pAppRegistry = UiApp::App::GetInstance()->GetAppRegistry();
 
-       __pFolderEntryPM->GetFolderEntryCount(FolderNavigationPresentationModel::GetCurrentPath(), dirCount, fileCount);
 
        TryCatch(__pFileNames != null, , "MfMyFilesApp::Filename list if empty!");
        TryCatch(__pFileNames->GetCount() != 0, , "MfMyFilesApp::Filename count is Zero!");
@@ -343,6 +342,7 @@ BaseItemProvider::CreateNormalListViewItem(int listItemIndex, int listItemWidth)
 
        if (__sourceInfo == CREATE_ITEM_SOURCE_SHARE_FORM)
        {
+               __pFolderEntryPM->GetFolderEntryCount(FolderNavigationPresentationModel::GetCurrentPath(), dirCount, fileCount);
                tempIndex = dirCount + listItemIndex;
                listItemIndex = tempIndex;
        }
index ad63e2f..0cba138 100644 (file)
@@ -539,7 +539,7 @@ FolderEntryPresentationModel::GetFolderEntryCount(const String& filePath, int& c
        result r = E_SUCCESS;
        Directory* pDirectory = null;
        FileAttributes fileAttrib;
-       String fileExtension;
+
        ContentType contentType = CONTENT_TYPE_UNKNOWN;
 
        r = File::GetAttributes(filePath, fileAttrib);
@@ -576,9 +576,6 @@ FolderEntryPresentationModel::GetFolderEntryCount(const String& filePath, int& c
 
                                        r = File::GetAttributes(fullpath, fileAttrib);
 
-                                       fileExtension = File::GetFileExtension(fullpath);
-                                       contentType = ContentManagerUtil::CheckContentType(fullpath);
-
                                        if (fileAttrib.IsDirectory())
                                        {
                                                currentDirectoryCount++;
@@ -589,38 +586,43 @@ FolderEntryPresentationModel::GetFolderEntryCount(const String& filePath, int& c
                                                {
                                                        currentFileCount++;
                                                }
-                                               else if (__entryType == FILE_TYPE_AUDIO_TYPE)
+                                               else
                                                {
-                                                       if (contentType == CONTENT_TYPE_AUDIO)
+                                                       contentType = ContentManagerUtil::CheckContentType(fullpath);
+
+                                                       if (__entryType == FILE_TYPE_AUDIO_TYPE)
                                                        {
-                                                               currentFileCount++;
+                                                               if (contentType == CONTENT_TYPE_AUDIO)
+                                                               {
+                                                                       currentFileCount++;
+                                                               }
                                                        }
-                                               }
-                                               else if (__entryType == FILE_TYPE_VIDEO_TYPE)
-                                               {
-                                                       if (contentType == CONTENT_TYPE_VIDEO)
+                                                       else if (__entryType == FILE_TYPE_VIDEO_TYPE)
                                                        {
-                                                               currentFileCount++;
+                                                               if (contentType == CONTENT_TYPE_VIDEO)
+                                                               {
+                                                                       currentFileCount++;
+                                                               }
                                                        }
-                                               }
-                                               else if (__entryType == FILE_TYPE_IMAGE_TYPE)
-                                               {
-                                                       if (contentType == CONTENT_TYPE_IMAGE)
+                                                       else if (__entryType == FILE_TYPE_IMAGE_TYPE)
                                                        {
-                                                               currentFileCount++;
+                                                               if (contentType == CONTENT_TYPE_IMAGE)
+                                                               {
+                                                                       currentFileCount++;
+                                                               }
                                                        }
-                                               }
-                                               else if (__entryType == FILE_TYPE_CONTACTS_TYPE)
-                                               {
-                                                       if (fullpath.EndsWith(L"vcs") || fullpath.EndsWith(L"VCS"))
+                                                       else if (__entryType == FILE_TYPE_CONTACTS_TYPE)
                                                        {
-                                                               currentFileCount++;
+                                                               if (fullpath.EndsWith(L"vcs") || fullpath.EndsWith(L"VCS"))
+                                                               {
+                                                                       currentFileCount++;
+                                                               }
                                                        }
                                                }
                                        }
                                }
                        }
-
+                       AppLogDebug("check 6");
                        if (pDirectory != null)
                        {
                                delete pDirectory;