Commit 89d5c872 authored by JC Brand's avatar JC Brand

Don't mark messages as read when received in a hidden MUC

parent ffbab33a
......@@ -363,7 +363,7 @@ export const ChatBoxView = View.extend({
* - An optional message that serves as the cause for needing to scroll down.
*/
maybeScrollDown (message) {
if (message?.get('sender') === 'me' || !this.model.get('scrolled')) {
if (message?.get('sender') === 'me' || !this.model.isHidden()) {
this.debouncedScrollDown();
}
},
......@@ -996,9 +996,7 @@ export const ChatBoxView = View.extend({
onScrolledDown () {
this.hideNewMessagesIndicator();
if (_converse.windowState !== 'hidden') {
this.model.clearUnreadMsgCounter();
}
(!this.model.isHidden()) && this.model.clearUnreadMsgCounter();
/**
* Triggered once the chat's message area has been scrolled down to the bottom.
* @event _converse#chatBoxScrolledDown
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment