diff --git a/CHANGES.md b/CHANGES.md index 8fb26ab14..7b96e033b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,8 @@ ### Bugfixes - 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. +- 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 support `pubsub#publish-options` were visible to all your contacts, even @@ -27,6 +29,8 @@ though they should be private._ - 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` +### Translation updates +- Chinese (Traditional), French, German, Portuguese (Brazil), Russian, Ukrainian ## 3.3.2 (2018-01-29) diff --git a/src/converse-chatboxes.js b/src/converse-chatboxes.js index 6b941021b..d6777d32c 100644 --- a/src/converse-chatboxes.js +++ b/src/converse-chatboxes.js @@ -195,8 +195,8 @@ incrementUnreadMsgCounter (stanza) { /* Given a newly received message, update the unread counter if - * necessary. - */ + * necessary. + */ if (_.isNull(stanza.querySelector('body'))) { return; // The message has no text } diff --git a/src/converse-chatview.js b/src/converse-chatview.js index 33aa6cccb..e826dcbd8 100644 --- a/src/converse-chatview.js +++ b/src/converse-chatview.js @@ -1136,6 +1136,7 @@ afterShown (focus) { if (u.isPersistableModel(this.model)) { + this.model.clearUnreadMsgCounter(); this.model.save(); } this.setChatState(_converse.ACTIVE); @@ -1219,7 +1220,7 @@ } }, - onScrolledDown() { + onScrolledDown () { this.hideNewMessagesIndicator(); if (_converse.windowState !== 'hidden') { this.model.clearUnreadMsgCounter(); diff --git a/src/converse-muc.js b/src/converse-muc.js index 3c901e2ef..eb47063a8 100644 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -558,9 +558,8 @@ * * This is instead done in `afterConnected` below. */ - if (this.model.collection && this.model.collection.browserStorage) { - // Without a connection, we haven't yet initialized - // localstorage + if (u.isPersistableModel(this.model)) { + this.model.clearUnreadMsgCounter(); this.model.save(); } this.occupantsview.setOccupantsHeight(); diff --git a/src/converse-singleton.js b/src/converse-singleton.js index 18d0bbc62..07dfdc1bf 100644 --- a/src/converse-singleton.js +++ b/src/converse-singleton.js @@ -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: { openChat (ev) { /* We only have one chat visible at any one