Skip to content

Commit

Permalink
setAutoScrollToBottom to true when changing channels
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikJannsen committed Mar 31, 2024
1 parent e564013 commit c5ca638
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void onActivate() {
});

layoutChildrenDonePin = EasyBind.subscribe(model.getLayoutChildrenDone(), layoutChildrenDone -> {
UIThread.runOnNextRenderFrame(this::handleScrollValueChanged);
handleScrollValueChanged();
});

applyScrollValue(1);
Expand Down Expand Up @@ -191,6 +191,7 @@ private void selectedChannelChanged(ChatChannel<? extends ChatMessage> channel)
model.getChatMessages().forEach(ChatMessageListItem::dispose);
model.getChatMessages().clear();
model.getChatMessageIds().clear();
model.setAutoScrollToBottom(true);

if (channel instanceof BisqEasyOfferbookChannel) {
chatMessagesPin = bindChatMessages((BisqEasyOfferbookChannel) channel);
Expand Down

0 comments on commit c5ca638

Please sign in to comment.