From 72463a76e2b72de5bf01a6d7084a74822732969e Mon Sep 17 00:00:00 2001 From: ricardo Date: Thu, 18 Apr 2024 16:39:16 -0600 Subject: [PATCH] Stop new chat from affecting chat position when scrolled up --- src/Screens.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Screens.c b/src/Screens.c index bf5ff5577..6a07f53d0 100644 --- a/src/Screens.c +++ b/src/Screens.c @@ -1073,6 +1073,9 @@ static void ChatScreen_ChatReceived(void* screen, const cc_string* msg, int type s->dirty = true; if (type == MSG_TYPE_NORMAL) { + /* Check if the chatIndex isn't located at the bottom of the chat log, that means that the user has scrolled. */ + if (Chat_Log.count - s->chatIndex != Gui.Chatlines + 1) return; + s->chatIndex++; if (!Gui.Chatlines) return; TextGroupWidget_ShiftUp(&s->chat);