Commit f79fd333 authored by JC Brand's avatar JC Brand

Chat views: listen whether `hidden` gets set and show/hide

parent ced43363
......@@ -52,11 +52,12 @@ export const ChatBoxView = View.extend({
async initialize () {
this.initDebounced();
this.listenTo(this.model, 'change:composing_spoiler', this.renderMessageForm);
this.listenTo(this.model, 'change:hidden', m => m.get('hidden') ? this.hide() : this.show());
this.listenTo(this.model, 'change:status', this.onStatusMessageChanged);
this.listenTo(this.model, 'destroy', this.remove);
this.listenTo(this.model, 'show', this.show);
this.listenTo(this.model, 'vcard:change', this.renderHeading);
this.listenTo(this.model, 'change:composing_spoiler', this.renderMessageForm);
if (this.model.contact) {
this.listenTo(this.model.contact, 'destroy', this.renderHeading);
......
......@@ -89,6 +89,7 @@ export const ChatRoomView = ChatBoxView.extend({
this.listenTo(this.model, 'change', debounce(() => this.renderHeading(), 250));
this.listenTo(this.model, 'change:composing_spoiler', this.renderMessageForm);
this.listenTo(this.model, 'change:hidden', m => m.get('hidden') ? this.hide() : this.show());
this.listenTo(this.model, 'change:hidden_occupants', this.renderToolbar);
this.listenTo(this.model, 'configurationNeeded', this.getAndRenderConfigurationForm);
this.listenTo(this.model, 'destroy', this.hide);
......
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