aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChatWindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ChatWindow.cpp b/src/ChatWindow.cpp
index 98c4269..c82e7fa 100644
--- a/src/ChatWindow.cpp
+++ b/src/ChatWindow.cpp
@@ -188,7 +188,7 @@ namespace dchat
message->text.set_text(message->text.get_text() + "\n" + request.message.text);
// Since messages that are sent withing a timeframe are combined, several message ids can refer to the same message
messageById[request.message.id] = message;
- if(*request.room->id == *currentRoom->id)
+ if(!request.loadedFromCache && *request.room->id == *currentRoom->id)
{
auto adj = messageArea.get_vadjustment();
adj->set_value(adj->get_upper());
@@ -208,7 +208,7 @@ namespace dchat
messageAreaLayout.attach(*message, 0, roomMessages.size(), 1, 1);
// TODO: When we get a message in the current room we scroll to the bottom, but this should only be done if we are not manually scrolling to view old messages
- if(*request.room->id == *currentRoom->id)
+ if(!request.loadedFromCache && *request.room->id == *currentRoom->id)
{
auto adj = messageArea.get_vadjustment();
adj->set_value(adj->get_upper());