Skip to content

Commit 18d0ff9

Browse files
committed
fix: chat window scrolling issues
The chat window in group chats and conferences should now stay scrolled to the bottom of the chat history when the peer list is unhidden
1 parent 55786f6 commit 18d0ff9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/conference.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,12 @@ static void conference_onDraw(ToxWindow *self, Toxic *toxic)
11591159

11601160
curs_set(1);
11611161

1162+
if (self->x != x2 && !self->scroll_pause) {
1163+
line_info_reset_start(self, ctx->hst);
1164+
}
1165+
1166+
self->x = x2;
1167+
11621168
if (ctx->len > 0) {
11631169
mvwprintw(ctx->linewin, 0, 0, "%ls", &ctx->line[ctx->start]);
11641170
}

src/groupchats.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,6 +2116,10 @@ static void groupchat_onDraw(ToxWindow *self, Toxic *toxic)
21162116

21172117
if (self->x != x2) {
21182118
groupchat_update_statusbar_topic(self, toxic->tox);
2119+
2120+
if (!self->scroll_pause) {
2121+
line_info_reset_start(self, ctx->hst);
2122+
}
21192123
}
21202124

21212125
draw_groupchat_top_bar(self, toxic, x2);

0 commit comments

Comments
 (0)