Bläddra i källkod

feat(PageReload): make the reload interval random, between 10-30 sec

master
paweldomas 8 år sedan
förälder
incheckning
3c6d464b32
1 ändrade filer med 4 tillägg och 2 borttagningar
  1. 4
    2
      modules/UI/UI.js

+ 4
- 2
modules/UI/UI.js Visa fil

21
 import Profile from "./side_pannels/profile/Profile";
21
 import Profile from "./side_pannels/profile/Profile";
22
 import Settings from "./../settings/Settings";
22
 import Settings from "./../settings/Settings";
23
 import RingOverlay from "./ring_overlay/RingOverlay";
23
 import RingOverlay from "./ring_overlay/RingOverlay";
24
+import RandomUtil from "../util/RandomUtil";
24
 import UIErrors from './UIErrors';
25
 import UIErrors from './UIErrors';
25
 
26
 
26
 var EventEmitter = require("events");
27
 var EventEmitter = require("events");
1046
  * @returns {Promise} Resolved with value - false if the dialog is enabled and
1047
  * @returns {Promise} Resolved with value - false if the dialog is enabled and
1047
  * resolved with true if the dialog is disabled or the feedback was already
1048
  * resolved with true if the dialog is disabled or the feedback was already
1048
  * submitted. Rejected if another dialog is already displayed. This values are
1049
  * submitted. Rejected if another dialog is already displayed. This values are
1049
- * used to display or not display the thank you dialog from 
1050
+ * used to display or not display the thank you dialog from
1050
  * conference.maybeRedirectToWelcomePage method.
1051
  * conference.maybeRedirectToWelcomePage method.
1051
  */
1052
  */
1052
 UI.requestFeedbackOnHangup = function () {
1053
 UI.requestFeedbackOnHangup = function () {
1103
  * the page should be reloaded.
1104
  * the page should be reloaded.
1104
  */
1105
  */
1105
 UI.showPageReloadOverlay = function () {
1106
 UI.showPageReloadOverlay = function () {
1106
-    PageReloadOverlay.show(15 /* will reload in 15 seconds */);
1107
+    // Reload the page after 10 - 30 seconds
1108
+    PageReloadOverlay.show(10 + RandomUtil.randomInt(0, 20));
1107
 };
1109
 };
1108
 
1110
 
1109
 /**
1111
 /**

Laddar…
Avbryt
Spara