absorb updater.js into the Platforms, gets rid of pointless setInterval in Electron

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit 24e8a30)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-06-03 12:50:47 +01:00
parent 24a5297fc8
commit 0e6012ad45
4 changed files with 17 additions and 33 deletions

View file

@ -26,6 +26,8 @@ import q from 'q';
import url from 'url';
import UAParser from 'ua-parser-js';
var POKE_RATE_MS = 10 * 60 * 1000; // 10 min
export default class WebPlatform extends VectorBasePlatform {
constructor() {
super();
@ -132,6 +134,11 @@ export default class WebPlatform extends VectorBasePlatform {
return this._getVersion();
}
startUpdater() {
this.pollForUpdate();
setInterval(this.pollForUpdate, POKE_RATE_MS);
}
pollForUpdate() {
this._getVersion().done((ver) => {
if (this.runningVersion === null) {