Skip to content

Commit

Permalink
Don't show minimized chats when logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Sep 6, 2021
1 parent 0950555 commit f40a8f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -7,6 +7,7 @@
- #2629: OMEMO button tooltip is wrong in private chat
- #2633: Excessive logging of warning
- #2634: Image previews not loading when not serving Converse locally
- Bugfix: Don't show minimized chats when logged out

## 8.0.0 (2021-09-03)

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/chatboxviews/templates/chats.js
Expand Up @@ -16,7 +16,7 @@ export default () => {
const connection = _converse?.connection;
const logged_out = !connection?.connected || !connection?.authenticated || connection?.disconnecting;
return html`
${view_mode === 'overlayed' ? html`<converse-minimized-chats></converse-minimized-chats>` : ''}
${!logged_out && view_mode === 'overlayed' ? html`<converse-minimized-chats></converse-minimized-chats>` : ''}
${repeat(chatboxes.filter(shouldShowChat), m => m.get('jid'), m => {
if (m.get('type') === CONTROLBOX_TYPE) {
return html`
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/minimize/view.js
Expand Up @@ -23,6 +23,10 @@ export default class MinimizedChats extends CustomElement {
this.listenTo(this.model, 'change:name', this.requestUpdate)
this.listenTo(this.model, 'change:num_unread', this.requestUpdate)
this.listenTo(this.model, 'remove', this.requestUpdate)

this.listenTo(_converse, 'connected', this.requestUpdate);
this.listenTo(_converse, 'reconnected', this.requestUpdate);
this.listenTo(_converse, 'disconnected', this.requestUpdate);
}

render () {
Expand Down

0 comments on commit f40a8f6

Please sign in to comment.