A platform for community discussion. Free, open, simple.
FIX: Don't mark messages as seen on non-user scroll (#39408)
Jarek Radosz82d1e1ba44b3
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel.gjsindex 5ca05d77a33..cfa73fc955d 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel.gjs@@ -499,7 +499,9 @@ export default class ChatChannel extends Component {this.atBottom = state.atBottom;if (state.atBottom) {- this.paneState.clearPendingMessages();+ if (this.paneState.userIsPresent) {+ this.paneState.clearPendingMessages();+ }this.fetchMoreMessages({ direction: FUTURE });this.chatChannelScrollPositions.delete(this.args.channel.id);} else {diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-thread.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-thread.gjsindex db0e5b3ddf2..923d0737c7e 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat-thread.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/chat-thread.gjs@@ -149,7 +149,9 @@ export default class ChatThread extends Component {this.atBottom = state.atBottom;if (state.atBottom) {- this.paneState.clearPendingMessages();+ if (this.paneState.userIsPresent) {+ this.paneState.clearPendingMessages();+ }this.fetchMoreMessages({ direction: FUTURE });} else {this.paneState.updatePendingContentFromScrollState({