From: Italo Rossi Date: Tue, 6 Oct 2015 02:09:54 +0000 (-0300) Subject: FS-8300 [verto_communicator] Fixing reload bug, no need to do two times now. X-Git-Tag: v1.6.3~1^2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb2588d88c8b4b2b5a31b3e8dc04634e4a7c0929;p=thirdparty%2Ffreeswitch.git FS-8300 [verto_communicator] Fixing reload bug, no need to do two times now. --- diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index 888383c0f7..d59132b50b 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js @@ -528,7 +528,9 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora cleanShareCall(that); } else { stopConference(); - cleanCall(); + if (!that.reloaded) { + cleanCall(); + } } break; default: @@ -571,6 +573,13 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora iceServers: storage.data.useSTUN }, callbacks); + // We need to know when user reloaded page and not react to + // verto events in order to not stop the reload and redirect user back + // to the dialpad. + that.reloaded = false; + jQuery.verto.unloadJobs.push(function() { + that.reloaded = true; + }); data.instance.deviceParams({ useCamera: storage.data.selectedVideo, useMic: storage.data.selectedAudio,