diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-06-29 20:25:49 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-06-29 20:29:25 +0800 |
commit | 2cba9cbe1638c309e680778598ff66e319615b0a (patch) | |
tree | 6802b5c532c003d26487e00f47ef96c1a5f0d40d /libempathy-gtk/empathy-chat.c | |
parent | 807c4cdfac49d1cf4d8eefbda394c2b53bd5598b (diff) | |
download | gsoc2013-empathy-2cba9cbe1638c309e680778598ff66e319615b0a.tar gsoc2013-empathy-2cba9cbe1638c309e680778598ff66e319615b0a.tar.gz gsoc2013-empathy-2cba9cbe1638c309e680778598ff66e319615b0a.tar.bz2 gsoc2013-empathy-2cba9cbe1638c309e680778598ff66e319615b0a.tar.lz gsoc2013-empathy-2cba9cbe1638c309e680778598ff66e319615b0a.tar.xz gsoc2013-empathy-2cba9cbe1638c309e680778598ff66e319615b0a.tar.zst gsoc2013-empathy-2cba9cbe1638c309e680778598ff66e319615b0a.zip |
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.
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 |