From 1a71edcbe02479c89e94cc4fe5fd707349e91ff5 Mon Sep 17 00:00:00 2001 From: Abhishek Sansanwal Date: Wed, 12 Jul 2017 17:22:33 +0530 Subject: [PATCH] Fixed scan list items appearing late issue Description: Instead of deleting the evas object every time we only hide it and show it when the scan is performed again. Signed-off-by: Abhishek Sansanwal Change-Id: I1627541c490c93d8582c1061a2f44377ad403473 --- src/layout/layout_network.c | 12 +++++++++--- src/view/network/view_wireless_list.c | 16 ---------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/layout/layout_network.c b/src/layout/layout_network.c index fa58589..c0c7411 100644 --- a/src/layout/layout_network.c +++ b/src/layout/layout_network.c @@ -1320,13 +1320,19 @@ static void _data_event_cb(enum event_type type, void *data) _destroy_scanning_popup(); - if (!viewmgr_remove_view(VIEW_WIRELESS_LIST)) - _ERR("Update view failed"); - if (!viewmgr_add_view(view_wireless_list_get_vclass(), priv)) { _ERR("Add view failed"); } + viewmgr_show_view(VIEW_WIRELESS_LIST); + list = datamgr_get_data(priv->wirelessmgr); + + if (!list) { + _draw_no_contents_message(priv); + return; + } + + _wireless_data_found_done(priv->ly, list); break; case EVENT_DATA_SELECT_DONE: diff --git a/src/view/network/view_wireless_list.c b/src/view/network/view_wireless_list.c index 67b674f..86bb1a8 100644 --- a/src/view/network/view_wireless_list.c +++ b/src/view/network/view_wireless_list.c @@ -62,8 +62,6 @@ static void widget_min_set(Evas_Object *table, Evas_Object *obj, Evas_Coord w, E static void _destroy_list_type_popup(struct _priv *priv) { evas_object_hide(wifi_list_popup); - evas_object_del(wifi_list_popup); - viewmgr_remove_view(VIEW_WIRELESS_LIST); _destroy_scanning_popup(); } @@ -94,7 +92,6 @@ static Evas_Object *_create(Evas_Object *win, void *data) struct _priv *priv = NULL; Evas_Object *ly = NULL; Evas_Object *table = NULL; - Eina_List *list; Evas_Object *grid; if (!win) { _ERR("Get window object failed."); @@ -119,12 +116,6 @@ static Evas_Object *_create(Evas_Object *win, void *data) evas_object_event_callback_add(wifi_list_popup, EVAS_CALLBACK_KEY_DOWN, _popup_list_key_down_cb, priv); - list = datamgr_get_data(priv->wirelessmgr); - if (!list) { - return NULL; - } - _wireless_data_found_done(ly, list); - table = elm_table_add(wifi_list_popup); evas_object_size_hint_weight_set(table, 0, @@ -159,13 +150,6 @@ static Evas_Object *_create(Evas_Object *win, void *data) if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) _ERR("Listmgr update list failed."); - datamgr_update(priv->wirelessmgr, WIRELESS_ACTIVATE); - list = datamgr_get_data(priv->wirelessmgr); - if (!list) { - return NULL; - } - if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) - _ERR("Listmgr update list failed."); elm_object_focus_allow_set(wifi_list_popup, EINA_TRUE); -- 2.7.4