Browse Source

Make ParticipantView to render automatically when its collection changes

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
pull/439/head
Daniel Calviño Sánchez 8 years ago
parent
commit
e26d1f17b9
  1. 14
      js/views/participantview.js
  2. 1
      js/views/roomlistview.js

14
js/views/participantview.js

@ -74,6 +74,20 @@
OCA.SpreedMe.Views.ParticipantView = Marionette.CollectionView.extend({
tagName: 'ul',
className: 'participantWithList',
collectionEvents: {
'update': function() {
this.render();
},
'reset': function() {
this.render();
},
'sort': function() {
this.render();
},
'sync': function() {
this.render();
}
},
childView: Marionette.View.extend({
tagName: 'li',
modelEvents: {

1
js/views/roomlistview.js

@ -186,7 +186,6 @@
OCA.SpreedMe.app._participants.setRoom(this.model);
OCA.SpreedMe.app._participants.fetch();
OCA.SpreedMe.app._participantsView.render();
if (!$content.hasClass('with-app-sidebar')) {
$content.addClass('with-app-sidebar');

Loading…
Cancel
Save