Add a version update checker and NewVersionBar to show on the UI.
This commit is contained in:
parent
deb1aa468f
commit
5eed734325
4 changed files with 101 additions and 0 deletions
|
@ -30,6 +30,7 @@ var sdk = require("matrix-react-sdk");
|
|||
sdk.loadSkin(require('../component-index'));
|
||||
var VectorConferenceHandler = require('../VectorConferenceHandler');
|
||||
var configJson = require("../../config.json");
|
||||
var UpdateChecker = require("./updater");
|
||||
|
||||
var qs = require("querystring");
|
||||
|
||||
|
@ -105,6 +106,10 @@ function onHashChange(ev) {
|
|||
routeUrl(window.location);
|
||||
}
|
||||
|
||||
function onNewVersion(current, latest) {
|
||||
window.matrixChat.onNewVersion(current, latest);
|
||||
}
|
||||
|
||||
var loaded = false;
|
||||
var lastLoadedScreen = null;
|
||||
|
||||
|
@ -138,6 +143,8 @@ window.onload = function() {
|
|||
if (!validBrowser) {
|
||||
return;
|
||||
}
|
||||
UpdateChecker.setNewVersionListener(onNewVersion);
|
||||
UpdateChecker.run();
|
||||
routeUrl(window.location);
|
||||
loaded = true;
|
||||
if (lastLoadedScreen) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue