Sfoglia il codice sorgente

limit how often now indicator can refresh

Adam Shaw 10 anni fa
parent
commit
e0a0b4d334
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      src/common/View.js

+ 1 - 0
src/common/View.js

@@ -483,6 +483,7 @@ var View = FC.View = Class.extend({
 				this.nowIndicatorTimeoutID = null;
 				update();
 				delay = +moment.duration(1, unit);
+				delay = Math.max(100, delay); // prevent too frequent
 				this.nowIndicatorIntervalID = setInterval(update, delay); // update every interval
 			}, delay);
 		}