]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8300 [verto_communicator] Fixing reload bug, no need to do two times now.
authorItalo Rossi <italorossib@gmail.com>
Tue, 6 Oct 2015 02:09:54 +0000 (23:09 -0300)
committerItalo Rossi <italorossib@gmail.com>
Tue, 6 Oct 2015 02:09:54 +0000 (23:09 -0300)
html5/verto/verto_communicator/src/vertoService/services/vertoService.js

index 888383c0f742bce0671f1c883154bc900bc1c24e..d59132b50b0fe227a67dad9bf8cbc21268e1ff62 100644 (file)
@@ -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,