Commit 6294dda9 authored by Mohammed Sadiq's avatar Mohammed Sadiq
Browse files

chat: Add API to prepend message

parent e204078a
......@@ -757,6 +757,21 @@ chatty_chat_prepend_message (ChattyChat *self,
g_signal_emit (self, signals[CHANGED], 0);
chatty_chat_prepend_messages (ChattyChat *self,
GPtrArray *messages)
g_return_if_fail (CHATTY_IS_CHAT (self));
if (!messages || messages->len == 0)
g_return_if_fail (CHATTY_IS_MESSAGE (messages->pdata[0]));
g_list_store_splice (self->message_store, 0, 0, messages->pdata, messages->len);
g_signal_emit (self, signals[CHANGED], 0);
* chatty_chat_add_users:
* @self: a #ChattyChat
......@@ -55,6 +55,8 @@ void chatty_chat_append_message (ChattyChat *self,
ChattyMessage *message);
void chatty_chat_prepend_message (ChattyChat *self,
ChattyMessage *message);
void chatty_chat_prepend_messages (ChattyChat *self,
GPtrArray *messages);
void chatty_chat_add_users (ChattyChat *self,
GList *users);
void chatty_chat_remove_user (ChattyChat *self,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment