Prevent flood warnings

Only load user info on first start when the user actually has a pic to display.
This commit is contained in:
mjentsch 2015-09-08 22:09:15 +02:00
parent 546bcdc760
commit e82fef3826

View file

@ -331,9 +331,11 @@ static void on_get_dialog_list_done (struct tgl_state *TLS, void *callback_extra
if (! buddy) {
buddy = p2tgl_buddy_new (TLS, UC);
purple_blist_add_buddy (buddy, NULL, tggroup, NULL);
}
if (UC->user.photo_id) {
tgl_do_get_user_info (TLS, UC->id, 0, on_user_get_info, get_user_info_data_new (0, UC->id));
if (UC->user.photo_id) {
debug ("tgl_do_get_user_info(%s)", UC->print_name);
tgl_do_get_user_info (TLS, UC->id, 0, on_user_get_info, get_user_info_data_new (0, UC->id));
}
}
p2tgl_prpl_got_user_status (TLS, UC->id, &UC->user.status);