From 7bdd9f57a59d89838686b6aca0c74c5a1b13007d Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 3 Feb 2016 16:16:52 +0000 Subject: [PATCH] Add MatrixChat.onNewVersion to trigger the new version bar --- src/components/structures/MatrixChat.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index fb6d36ce35..677d69de6d 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -804,6 +804,12 @@ module.exports = React.createClass({ this.showScreen("settings"); }, + onNewVersion: function(current, latest) { + this.setState({ + hasNewVersion: true + }); + }, + updateFavicon: function() { var notifCount = 0; @@ -851,6 +857,7 @@ module.exports = React.createClass({ var RoomDirectory = sdk.getComponent('structures.RoomDirectory'); var MatrixToolbar = sdk.getComponent('globals.MatrixToolbar'); var GuestWarningBar = sdk.getComponent('globals.GuestWarningBar'); + var NewVersionBar = sdk.getComponent('globals.NewVersionBar'); var ForgotPassword = sdk.getComponent('structures.login.ForgotPassword'); // needs to be before normal PageTypes as you are logged in technically @@ -920,6 +927,19 @@ module.exports = React.createClass({ ); + } else if (this.state.hasNewVersion) { + return ( +
+ +
+ +
+ {page_element} +
+ {right_panel} +
+
+ ); } else { return (