diff --git a/data/conversationmessageslist.h b/data/conversationmessageslist.h index b9aa8b6..2e824e3 100644 --- a/data/conversationmessageslist.h +++ b/data/conversationmessageslist.h @@ -17,7 +17,7 @@ public: ConversationMessagesList(); /** - * Get the ID of the oldest message of + * Get the ID of the newest message of * the conversation * * @return The ID of the message / -1 in case of failure diff --git a/widgets/conversationwidget.cpp b/widgets/conversationwidget.cpp index c24fafa..5a89f43 100644 --- a/widgets/conversationwidget.cpp +++ b/widgets/conversationwidget.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "conversationwidget.h" #include "ui_conversationwidget.h" @@ -136,6 +137,16 @@ void ConversationWidget::getMessagesCallback(bool success, QListscrollArea->verticalScrollBar()->setValue( + ui->scrollArea->verticalScrollBar()->maximum()); } void ConversationWidget::sendMessageCallback(bool success) diff --git a/widgets/conversationwidget.h b/widgets/conversationwidget.h index a828384..6c5a95b 100644 --- a/widgets/conversationwidget.h +++ b/widgets/conversationwidget.h @@ -59,6 +59,11 @@ private slots: */ void getMessagesCallback(bool success, QList list); + /** + * Scroll to the bottom of the conversation + */ + void scrollToBottom(); + /** * Method called once the server replied to a send conversation * message request