[TIZENIOT-1972] [TIZENIOT-1973] fix menu option issue after deleting all file in... 83/245083/1 submit/tizen/20201001.111612
authoraman.jeph <aman.jeph@samsung.com>
Thu, 1 Oct 2020 05:56:20 +0000 (11:26 +0530)
committeraman.jeph <aman.jeph@samsung.com>
Thu, 1 Oct 2020 05:56:20 +0000 (11:26 +0530)
Change-Id: I4d123cbc2137cd88cd06cf71a0fa7047c540e3e1
Signed-off-by: aman.jeph <aman.jeph@samsung.com>
src/common/mp-util-media-service.c
src/view/mp-video-list-remove-ctrl.c
src/view/mp-video-list-view-item-of-folder.c
src/view/mp-video-list-view-main.c
src/widget/mp-footer-toolbar.c

index f0c5e94c6f908ff26c859200d8dc37b985b859d5..79e9bc859aadd25777783ed3a7b8604f4e25ff60 100755 (executable)
@@ -731,7 +731,6 @@ static bool mp_util_svc_iterate_for_video_url_cb(media_info_h pMediaItem, void *
                char *szTmpItemFilePath = NULL;
 
                media_info_get_file_path(pMediaItem, &szTmpItemFilePath);
-               VideoLogInfo("URL: %s", szTmpItemFilePath);
 
                if (szTmpItemFilePath == NULL) {
                        VideoLogError("Fail to get file path of media item.");
@@ -739,7 +738,6 @@ static bool mp_util_svc_iterate_for_video_url_cb(media_info_h pMediaItem, void *
                }
                *pList = eina_list_append(*pList, szTmpItemFilePath);
        }
-       VideoLogError("EinaList size: %d", eina_list_count(*pList));
        return TRUE;
 }
 
index d7437107ffe93566b488551e5459d5377b421afa..f6dbb68f83c2b9123a4acd549432d5516bb2315d 100755 (executable)
@@ -197,7 +197,10 @@ static Eina_Bool mp_remove_ctrl_delete_item_idler_cb(void *pUserData)
                                        VideoLogInfo("Delete file url : %s", szFileUrl);
                                        /* Now when the data is cloud data,Click delete button, Send remove request to cloud server,
                                           then remove current item ,But Don't care of if this data is deleted from cloud server. */
-                                       unlink(szFileUrl);
+                                       int ret = unlink(szFileUrl);
+                                       if(ret != 0) {
+                                               VideoLogError("Error in unlink: %s", strerror(errno));
+                                       }
                                        MP_FREE_STRING(szFileUrl);
 
                                        mp_util_svc_remove_item_by_list_index(nCounter);
@@ -226,9 +229,7 @@ static Eina_Bool mp_remove_ctrl_delete_item_idler_cb(void *pUserData)
        double nDeleteRate =
                ((double) g_pRemoveCtrl->nDelCompltedItem) /
                ((double) g_pRemoveCtrl->nDelTotalItem);
-       VideoLogInfo
-               ("nDeleteRate:%f, nCompltedDeleteItem:%d, nTotalDeleteItem:%d",
-                nDeleteRate, g_pRemoveCtrl->nDelCompltedItem,
+       VideoLogInfo("nDeleteRate:%f, nCompltedDeleteItem:%d, nTotalDeleteItem:%d", nDeleteRate, g_pRemoveCtrl->nDelCompltedItem,
                 g_pRemoveCtrl->nDelTotalItem);
        if (g_pRemoveCtrl->pProgressbar) {
                elm_progressbar_value_set(g_pRemoveCtrl->pProgressbar,
index 526ecc82d54e24f628b77ba77381d8a692e0d4f1..63872a37b799eefde8fa6c0968856d5ee05357d9 100755 (executable)
@@ -603,6 +603,9 @@ void mp_folder_item_view_update_base_layout_content(Evas_Object* content)
        }
        elm_object_part_content_set(g_pFolderViewWidget->pFolderItemViewBaseLayout, "elm.content.swallow", content);
        evas_object_show(content);
+       if(g_pFolderViewHandle->pNaviframeItem) {
+               mp_folder_item_view_check_more_button_of_toolbar();
+       }
 }
 
 /**
index 935f6c111b6fe7ebbafc67ae696b70cf2688c216..d11161723d060d8a84646205f0147b3d851a0f7c 100755 (executable)
@@ -615,8 +615,6 @@ static void __mp_list_view_result_user_cb(MpListUpdateType eUpdateType)
 
        __mp_list_view_update_list(g_pMainViewHandle->nListTabType,
                                                           eUpdateType);
-
-       mp_list_view_check_more_button_of_toolbar();
 }
 
 /**
@@ -894,6 +892,14 @@ void mp_list_view_launching_video_player_cb(void *pUserData,
        mp_option_ctrl_delete_handle();
        mp_util_delete_popup_handle();
 
+       // first check for folder item view
+       if(mp_folder_item_view_is_current_view())
+       {
+               VideoLogInfo("Folder item is top view... update videos list for it");
+               mp_folder_item_view_update_video_list(eUpdateType);
+               return;
+       }
+
        int nViewType = g_pMainViewHandle->nCurrentViewType;
 #ifdef VS_FEATURE_LIST_VIEW
        if (nViewType == MP_LIST_VIEW_AS_NORMAL_LIST) {
index 879bd047f20f9ba459d96852ce4b0eb151b7bb04..d61a5210e4410f7f21458c705af50e37714b7839 100755 (executable)
@@ -295,8 +295,7 @@ void mp_ft_ctrl_more_btn_cb(void *pUserData, Evas_Object * pObject,
        } else {
                int nVideoListSize =
                        mp_util_svc_get_number_of_video_item_by_type();
-               VideoLogInfo("g_pToolbarWidget->nFooterListTabType=%d",
-                                        g_pToolbarWidget->nFooterListTabType);
+               VideoLogDebug("Videolist Size=%d", nVideoListSize);
                if (nVideoListSize > 0) {
                        if (g_pToolbarWidget->nFooterListTabType ==
                                FOOTER_TAB_TYPE_PERSONAL) {