From 96d23df39d3083eeb47ba7ff64d3eb38e97ab8a3 Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Wed, 29 Jun 2016 16:22:41 +0200 Subject: [PATCH] Reloading of the friend list after going to the chat room with shortcut --- gtk/friendlist.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/friendlist.c b/gtk/friendlist.c index 9db2699b1..2128ace66 100644 --- a/gtk/friendlist.c +++ b/gtk/friendlist.c @@ -172,12 +172,18 @@ gboolean linphone_gtk_on_key_press(GtkWidget *widget, GdkEvent *event, gpointer if (gtk_tree_model_get_iter_first(model, &iter)) { int index = 0; LinphoneFriend *lf = NULL; + LinphoneChatRoom *cr; do{ if (index == key) { const LinphoneAddress *uri; + gtk_tree_model_get (model, &iter,FRIEND_CHATROOM , &cr, -1); gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1); uri = linphone_friend_get_address(lf); - linphone_gtk_friend_list_set_chat_conversation(uri); + if (lf != NULL) linphone_gtk_friend_list_set_chat_conversation(uri); + if (cr != NULL){ + linphone_gtk_mark_chat_read(cr); + linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(friendlist)); + } return TRUE; } index++;