Fix slow update of "Join/leave call" button

The button is updated when the model changes, but the model was not
being synced when the user joined or left a call, so it only changed
when it was synced for any other reason.

Fixes #473

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2017-11-15 16:29:45 +01:00
Родитель a332901390
Коммит 2004490b37
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -661,10 +661,16 @@ var spreedPeerConnectionTable = [];
});
OCA.SpreedMe.webrtc.on('joinedCall', function() {
OCA.SpreedMe.app.syncRooms();
$('#app-content').removeClass('icon-loading');
$('.videoView').removeClass('hidden');
});
OCA.SpreedMe.webrtc.on('leftCall', function() {
OCA.SpreedMe.app.syncRooms();
});
OCA.SpreedMe.webrtc.on('channelOpen', function(channel) {
console.log('%s datachannel is open', channel.label);
});