From 2004490b37c67ec2c0aedce413cb1d1ec9c76dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Wed, 15 Nov 2017 16:29:45 +0100 Subject: Fix slow update of "Join/leave call" button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- js/webrtc.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/webrtc.js b/js/webrtc.js index 4037f7ade..27e7cc6bd 100644 --- a/js/webrtc.js +++ b/js/webrtc.js @@ -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); }); -- cgit v1.2.3