Commit 732c9233 authored by JC Brand's avatar JC Brand

Bugfix. Don't show hidden MUCs when new message received.

parent fc560bf8
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
### Bugfixes ### Bugfixes
- Attribute error when empty IQ stanza is returned for vCard query - Attribute error when empty IQ stanza is returned for vCard query
- Don't allow PEP bookmarks if `pubsub#publish-options` is not advertised by the server. - Don't allow PEP bookmarks if `pubsub#publish-options` is not advertised by the server.
- In fullscreen view, sometimes a background MUC would come into the foreground
when a new message appears inside it.
_Note: previously this meant that bookmarks sent to servers that don't _Note: previously this meant that bookmarks sent to servers that don't
support `pubsub#publish-options` were visible to all your contacts, even support `pubsub#publish-options` were visible to all your contacts, even
...@@ -27,6 +29,8 @@ though they should be private._ ...@@ -27,6 +29,8 @@ though they should be private._
- New configuration setting [root](https://conversejs.org/docs/html/configurations.html#root) - New configuration setting [root](https://conversejs.org/docs/html/configurations.html#root)
- The [view_mode](https://conversejs.org/docs/html/configurations.html#view-mode) setting now has a new possible value: `embedded` - The [view_mode](https://conversejs.org/docs/html/configurations.html#view-mode) setting now has a new possible value: `embedded`
### Translation updates
- Chinese (Traditional), French, German, Portuguese (Brazil), Russian, Ukrainian
## 3.3.2 (2018-01-29) ## 3.3.2 (2018-01-29)
......
...@@ -195,8 +195,8 @@ ...@@ -195,8 +195,8 @@
incrementUnreadMsgCounter (stanza) { incrementUnreadMsgCounter (stanza) {
/* Given a newly received message, update the unread counter if /* Given a newly received message, update the unread counter if
* necessary. * necessary.
*/ */
if (_.isNull(stanza.querySelector('body'))) { if (_.isNull(stanza.querySelector('body'))) {
return; // The message has no text return; // The message has no text
} }
......
...@@ -1136,6 +1136,7 @@ ...@@ -1136,6 +1136,7 @@
afterShown (focus) { afterShown (focus) {
if (u.isPersistableModel(this.model)) { if (u.isPersistableModel(this.model)) {
this.model.clearUnreadMsgCounter();
this.model.save(); this.model.save();
} }
this.setChatState(_converse.ACTIVE); this.setChatState(_converse.ACTIVE);
...@@ -1219,7 +1220,7 @@ ...@@ -1219,7 +1220,7 @@
} }
}, },
onScrolledDown() { onScrolledDown () {
this.hideNewMessagesIndicator(); this.hideNewMessagesIndicator();
if (_converse.windowState !== 'hidden') { if (_converse.windowState !== 'hidden') {
this.model.clearUnreadMsgCounter(); this.model.clearUnreadMsgCounter();
......
...@@ -558,9 +558,8 @@ ...@@ -558,9 +558,8 @@
* *
* This is instead done in `afterConnected` below. * This is instead done in `afterConnected` below.
*/ */
if (this.model.collection && this.model.collection.browserStorage) { if (u.isPersistableModel(this.model)) {
// Without a connection, we haven't yet initialized this.model.clearUnreadMsgCounter();
// localstorage
this.model.save(); this.model.save();
} }
this.occupantsview.setOccupantsHeight(); this.occupantsview.setOccupantsHeight();
......
...@@ -104,6 +104,15 @@ ...@@ -104,6 +104,15 @@
} }
}, },
ChatRoomView: {
show (focus) {
if (!this.model.get('hidden')) {
_.each(this.__super__._converse.chatboxviews.xget(this.model.get('id')), hideChat);
return this.__super__.show.apply(this, arguments);
}
}
},
RosterContactView: { RosterContactView: {
openChat (ev) { openChat (ev) {
/* We only have one chat visible at any one /* We only have one chat visible at any one
......
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