From 3dc4f1edd6808cb7e139e30be2c5d1b04e772df4 Mon Sep 17 00:00:00 2001 From: Lee jaeyoung Date: Tue, 12 Feb 2013 11:18:12 +0900 Subject: [PATCH] fix N_SE-24338 issue - issue for Loading bubbles after delete some messages --- composer/include/msg-ui-composer-bubble.h | 2 +- composer/src/bubble/msg-ui-composer-bubble-callback.c | 10 ++++------ composer/src/bubble/msg-ui-composer-bubble-list.c | 10 +++++----- composer/src/bubble/msg-ui-composer-bubble-main.c | 2 +- composer/src/ui-composer/msg-ui-composer-main.c | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/composer/include/msg-ui-composer-bubble.h b/composer/include/msg-ui-composer-bubble.h index 842330f..c2ed392 100755 --- a/composer/include/msg-ui-composer-bubble.h +++ b/composer/include/msg-ui-composer-bubble.h @@ -266,7 +266,7 @@ Eina_Bool msg_ui_bubble_item_load_cb(void *data); void msg_ui_bubble_resend_msg(PMSG_BUBBLE_DATA bubble_data, int msg_id); void msg_ui_bubble_delete_msg(PMSG_BUBBLE_DATA bubble_data, int msg_id); void msg_ui_bubble_refresh_msg_lock_status(PMSG_BUBBLE_DATA bubble_data, int msg_id); -void msg_ui_bubble_list_load(PMSG_BUBBLE_DATA bubble_data); +void msg_ui_bubble_list_load(PMSG_BUBBLE_DATA bubble_data, bool bload_draft); void msg_ui_bubble_list_data_update(PMSG_BUBBLE_DATA bubble_data); void msg_ui_bubble_list_update_read_status(PMSG_BUBBLE_DATA bubble_data); void msg_ui_bubble_item_data_update(PMSG_BUBBLE_DATA bubble_data, msg_struct_t msg); diff --git a/composer/src/bubble/msg-ui-composer-bubble-callback.c b/composer/src/bubble/msg-ui-composer-bubble-callback.c index 181e82a..87cb0cf 100755 --- a/composer/src/bubble/msg-ui-composer-bubble-callback.c +++ b/composer/src/bubble/msg-ui-composer-bubble-callback.c @@ -187,7 +187,7 @@ static void _delete_finish(PMSG_BUBBLE_DATA pData) } _bubble_show_normal_mode(pData->callback_data); - msg_ui_bubble_list_load(pData); + msg_ui_bubble_list_load(pData, false); pData->del_thread = NULL; } @@ -219,7 +219,7 @@ static void _del_thread_feedback_fn(void *data, Ecore_Thread *thread, void *msg_ msg_ui_bubble_show_notify(pData, dgettext("sys_string", "IDS_COM_POP_UNABLE_TO_DELETE")); _bubble_show_normal_mode(pData->callback_data); - msg_ui_bubble_list_load(pData); + msg_ui_bubble_list_load(pData, false); pData->del_thread = NULL; @@ -288,7 +288,7 @@ static void _del_all_item(PMSG_BUBBLE_DATA pData) msg_ui_bubble_show_notify(pData, dgettext("sys_string", "IDS_COM_POP_UNABLE_TO_DELETE")); _bubble_show_normal_mode(pData->callback_data); - msg_ui_bubble_list_load(pData); + msg_ui_bubble_list_load(pData, false); } D_LEAVE; @@ -540,7 +540,6 @@ static void __msg_ui_bubble_gl_sel(void *data, Evas_Object *obj, void *event_inf elm_genlist_item_selected_set(item, 0); - if (bubble_data->popup) { evas_object_del(bubble_data->popup); bubble_data->popup = NULL; @@ -1328,7 +1327,6 @@ static Evas_Object *__msg_ui_bubble_delete_confirm_popup(PMSG_BUBBLE_DATA pData) return popup; } - void msg_ui_bubble_ctlbar_delete_cb(void *data, Evas_Object *obj, void *event_info) { D_ENTER; @@ -1560,7 +1558,7 @@ void msg_ui_bubble_layout_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, voi } // bubble list update - msg_ui_bubble_list_load(bubble_data); + msg_ui_bubble_list_load(bubble_data, true); msg_ui_composer_navi_title_set((void *)cd); service_h svc_handle; if (service_create(&svc_handle) < 0 || svc_handle == NULL) { diff --git a/composer/src/bubble/msg-ui-composer-bubble-list.c b/composer/src/bubble/msg-ui-composer-bubble-list.c index 80bb82a..d526878 100755 --- a/composer/src/bubble/msg-ui-composer-bubble-list.c +++ b/composer/src/bubble/msg-ui-composer-bubble-list.c @@ -635,7 +635,7 @@ static void __msg_delete_ok_clicked_cb(void *data, Evas_Object *obj, void *event } else { msg_id = conv_data->msgId; err = msg_delete_message(bubble_data->msgHandle, msg_id); - msg_ui_bubble_list_load(bubble_data); + msg_ui_bubble_list_load(bubble_data, false); } if (err != MSG_SUCCESS) { @@ -1263,7 +1263,7 @@ static void __msg_bubble_copy_to_clicked_cb(void *data, Evas_Object *obj, void * if (err == MSG_SUCCESS) { msg_ui_bubble_status_message_post(bubble_data, dgettext("sys_string", "IDS_COM_POP_COPIED_P")); if (conv_data->storageId != MSG_STORAGE_PHONE) - msg_ui_bubble_list_load(bubble_data); + msg_ui_bubble_list_load(bubble_data, false); } else { goto COPY_FAIL; } @@ -1863,7 +1863,7 @@ Eina_Bool msg_ui_bubble_item_load_cb(void *data) } -void msg_ui_bubble_list_load(PMSG_BUBBLE_DATA bubble_data) +void msg_ui_bubble_list_load(PMSG_BUBBLE_DATA bubble_data, bool bload_draft) { MSG_UI_ENTER(MSG_UI_LEVEL_DEBUG); MSG_UI_RET_IF(MSG_UI_LEVEL_DEBUG, !bubble_data); @@ -1913,7 +1913,7 @@ void msg_ui_bubble_list_load(PMSG_BUBBLE_DATA bubble_data) } /* load last draft message */ - if (bubble_data->isDraft) { + if (bload_draft && bubble_data->isDraft) { D_MSG("last draft msgid is %d", msg_id); cd->loading_draft = true; @@ -2196,7 +2196,7 @@ void msg_ui_bubble_delete_msg(PMSG_BUBBLE_DATA bubble_data, int msg_id) err = msg_delete_thread_message_list(bubble_data->msgHandle, bubble_data->threadId, false); } else { err = msg_delete_message(bubble_data->msgHandle, msg_id); - msg_ui_bubble_list_load(bubble_data); + msg_ui_bubble_list_load(bubble_data, false); } if (err != MSG_SUCCESS) { diff --git a/composer/src/bubble/msg-ui-composer-bubble-main.c b/composer/src/bubble/msg-ui-composer-bubble-main.c index ff729ca..caa33f0 100755 --- a/composer/src/bubble/msg-ui-composer-bubble-main.c +++ b/composer/src/bubble/msg-ui-composer-bubble-main.c @@ -391,7 +391,7 @@ void msg_ui_bubble_start_view(PMSG_BUBBLE_DATA bubble_data) #ifdef _BUBBLE_FLICK_EVENT evas_object_event_callback_add(bubble_data->bubble_layout, EVAS_CALLBACK_MOUSE_DOWN, msg_ui_bubble_layout_mouse_down_cb, (const void*)bubble_data); #endif - msg_ui_bubble_list_load(bubble_data); + msg_ui_bubble_list_load(bubble_data, true); } Evas_Object *msg_ui_bubble_toolbar_btn_create(Evas_Object *parent, char *icon_path, char *button_text) diff --git a/composer/src/ui-composer/msg-ui-composer-main.c b/composer/src/ui-composer/msg-ui-composer-main.c index 6212884..3c98b6a 100755 --- a/composer/src/ui-composer/msg-ui-composer-main.c +++ b/composer/src/ui-composer/msg-ui-composer-main.c @@ -1057,7 +1057,7 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_reset(MSG_COMPOSER_VIEW_DATA_S *cd, servi } else if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER) { D_MSG("reload bubble view"); msg_ui_bubble_parse_bubble_data(cd->bubble_data, svc_handle); - msg_ui_bubble_list_load(cd->bubble_data); + msg_ui_bubble_list_load(cd->bubble_data, true); msg_ui_composer_navi_title_set((void *)cd); /* set recipient list for bubble composer */ -- 2.7.4