From 2cba9cbe1638c309e680778598ff66e319615b0a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 29 Jun 2010 14:25:49 +0200 Subject: chat: display pending messages once constructed if the channel is a room (#623112) Now that we wait that the TpChat has retrieved pending messages before considering it as ready, the message-received signal is fired *before* we connect it in EmpathyChat and so it misses them. We fix that by looking for pending messages once the EmpathyChat has been constructed. --- libempathy-gtk/empathy-chat.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index d50bfe468..487d0c118 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -2673,8 +2673,15 @@ chat_constructed (GObject *object) EmpathyChat *chat = EMPATHY_CHAT (object); EmpathyChatPriv *priv = GET_PRIV (chat); - if (priv->handle_type != TP_HANDLE_TYPE_ROOM) + if (priv->handle_type != TP_HANDLE_TYPE_ROOM) { + /* First display logs from the logger and then display pending messages */ chat_add_logs (chat); + } + else { + /* Just display pending messages for rooms */ + priv->can_show_pending = TRUE; + show_pending_messages (chat); + } } static void -- cgit v1.2.3