Commit 15aef10d authored by Koen Van den Wijngaert's avatar Koen Van den Wijngaert Committed by GitHub

#2092 fixes room list update loop with locked muc domains (#2268)

* Only update the room list after shown.bs.modal
* add changes to CHANGES.md
* Move shown listener to initialize
parent f68eb65c
......@@ -34,6 +34,7 @@ Soon we'll deprecate the latter, so prepare now.
- #2201: added html to converse.env
- #2213: added CustomElement to converse.env
- #2220: fix rendering of emojis in case `use_system_emojis == false` (again).
- #2092: fixes room list update loop when having the `locked_muc_domain` truthy or `'hidden'`
- The `api.archive.query` method no longer accepts an RSM instance as argument.
- The plugin `converse-uniview` has been removed and its functionality merged into `converse-chatboxviews`
- Removed the mockups from the project. Recommended to use tests instead.
......
......@@ -93,6 +93,11 @@ export default BootstrapModal.extend({
this.model.save('muc_domain', api.settings.get('muc_domain'));
}
this.listenTo(this.model, 'change:muc_domain', this.onDomainChange);
this.el.addEventListener('shown.bs.modal', () => api.settings.get('locked_muc_domain')
? this.updateRoomsList()
: this.el.querySelector('input[name="server"]').focus()
);
},
toHTML () {
......@@ -110,17 +115,6 @@ export default BootstrapModal.extend({
}));
},
afterRender () {
if (api.settings.get('locked_muc_domain')) {
this.updateRoomsList();
} else {
this.el.addEventListener('shown.bs.modal',
() => this.el.querySelector('input[name="server"]').focus(),
false
);
}
},
openRoom (ev) {
ev.preventDefault();
const jid = ev.target.getAttribute('data-room-jid');
......
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