Change-Id: Iaee432817dda8ef25f21b3332decf203646a751c
} else {
if (media_msg && media_msg->mime_type && strstr(media_msg->mime_type, "webp") != NULL) {
} else {
if (media_msg && media_msg->mime_type && strstr(media_msg->mime_type, "webp") != NULL) {
- item_to_display = get_image_from_path(img_path, entry);
+ char *tmp = ui_utils_get_resource(BROKEN_IMAGE);
+ //item_to_display = get_image_from_path(img_path, entry);
+ // To be fixed
+ item_to_display = get_image_from_path(tmp, entry);
evas_object_data_set(entry, "image_object", (void*)item_to_display);
} else {
item_to_display = get_image_from_path(img_path, entry);
evas_object_data_set(entry, "image_object", (void*)item_to_display);
} else {
item_to_display = get_image_from_path(img_path, entry);
if (img_path) {
if (strstr(img_path, ".webp") != NULL) {
if (img_path) {
if (strstr(img_path, ".webp") != NULL) {
- img_item = get_image_from_path(img_path, entry);
+ char *tmp = ui_utils_get_resource(BROKEN_IMAGE);
+ LOGE("broken image(webp): %s", tmp);
+ // To Be Fixed.
+ //img_item = get_image_from_path(img_path, entry);
+ img_item = get_image_from_path(tmp, entry);
entry_h = 200;
} else {
if (msg->media_type == tgl_message_media_document) {
entry_h = 200;
} else {
if (msg->media_type == tgl_message_media_document) {
buddies_info *buddy = NULL;
EINA_LIST_FREE(names_of_buddies, buddy) {
if (buddy) {
buddies_info *buddy = NULL;
EINA_LIST_FREE(names_of_buddies, buddy) {
if (buddy) {
- if(buddy->name) free(buddy->name);
+ if(buddy->name) {
+ free(buddy->name);
+ }
}
}
names_of_buddies = NULL;
}
}
names_of_buddies = NULL;
+ evas_object_data_set(ad->nf, "names_of_buddies", NULL);
}
for (int i = 0; i < user_list_size; i++) {
}
for (int i = 0; i < user_list_size; i++) {
}
Eina_List *names_of_buddies = evas_object_data_get(ad->nf, "names_of_buddies");
}
Eina_List *names_of_buddies = evas_object_data_get(ad->nf, "names_of_buddies");
- if(names_of_buddies != NULL){
- buddies_info *buddy = NULL;
- EINA_LIST_FREE(names_of_buddies, buddy) {
- if (buddy) {
- if(buddy->name) free(buddy->name);
- }
+ buddies_info *buddy = NULL;
+ EINA_LIST_FREE(names_of_buddies, buddy) {
+ if (buddy) {
+ free(buddy->name);
- names_of_buddies = NULL;
+ eina_list_free(names_of_buddies);
+ evas_object_data_set(ad->nf, "names_of_buddies", NULL);
evas_object_show(layout);
peer_with_pic_s *sel_item = eina_list_nth(ad->peer_list, user_id);
evas_object_show(layout);
peer_with_pic_s *sel_item = eina_list_nth(ad->peer_list, user_id);
+ if (!sel_item)
+ return;
+
tg_peer_info_s* user = sel_item->use_data;
/*************************** START: message list ************************************/
tg_peer_info_s* user = sel_item->use_data;
/*************************** START: message list ************************************/
snprintf(temp_name, 512, "%s", "unknown");
}
} else {
snprintf(temp_name, 512, "%s", "unknown");
}
} else {
- snprintf(temp_name, 512, "%s", get_buddy_phone_num_from_id(sel_item->use_data->peer_id));
+ if (phone_num) {
+ snprintf(temp_name, 512, "%s", phone_num);
+ } else {
+ snprintf(temp_name, 512, "%s", "unknown");
+ }
} else {
char* user_name = replace(sel_item->use_data->print_name, '_', " ");
snprintf(temp_name, 512, "%s", user_name);
} else {
char* user_name = replace(sel_item->use_data->print_name, '_', " ");
snprintf(temp_name, 512, "%s", user_name);
+
+ if (buddy_id == -1) {
+ load_peer_data(ad);
+ for (int i = 0; i < eina_list_count(ad->peer_list); i++) {
+ peer_with_pic_s* pic_item = eina_list_nth(ad->peer_list, i);
+ tg_peer_info_s* item = pic_item->use_data;
+
+ if (item->peer_id == sel_item->peer_id) {
+ ad->peer_in_cahtting_data = pic_item;
+ buddy_id = i;
+ break;
+ }
+ }
+ }
+
+ if (buddy_id == -1) {
+ show_toast(ad, "unable to get buddy info.");
+ ad->buddy_in_cahtting_data = NULL;
+ ad->peer_in_cahtting_data = NULL;
+ return;
+ }
+
ad->main_item_in_cahtting_data = sel_item;
#if 0
if (ad->panel) {
ad->main_item_in_cahtting_data = sel_item;
#if 0
if (ad->panel) {
#define LIST_CONTACT_ROUND_MASK_ICON FM_ICON_PATH"/info_page_pic_mask.png"
#define LIST_CONTACT_ROUND_MASK_ICON FM_ICON_PATH"/info_page_pic_mask.png"
+#define BROKEN_IMAGE FM_ICON_PATH"/T01_Nocontents_broken.png"
+
#define TG_LIST_OF_COUNTIRES FM_ICON_PATH"countries.txt"
#define TG_LIST_OF_COUNTIRES FM_ICON_PATH"countries.txt"