diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js
index e2fdeb4687..f42c752bb9 100644
--- a/src/components/structures/LoggedInView.js
+++ b/src/components/structures/LoggedInView.js
@@ -182,6 +182,7 @@ export default React.createClass({
const MatrixToolbar = sdk.getComponent('globals.MatrixToolbar');
const GuestWarningBar = sdk.getComponent('globals.GuestWarningBar');
const NewVersionBar = sdk.getComponent('globals.NewVersionBar');
+ const UpdateCheckBar = sdk.getComponent('globals.UpdateCheckBar');
let page_element;
let right_panel = '';
@@ -249,16 +250,16 @@ export default React.createClass({
break;
}
- var topBar;
+ let topBar;
if (this.props.hasNewVersion) {
topBar = ;
- }
- else if (this.props.matrixClient.isGuest()) {
+ } else if (this.props.checkingForUpdate) {
+ topBar = ;
+ } else if (this.props.matrixClient.isGuest()) {
topBar = ;
- }
- else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
+ } else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
topBar = ;
}
diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js
index 0dedc02270..706f7d35dd 100644
--- a/src/components/structures/MatrixChat.js
+++ b/src/components/structures/MatrixChat.js
@@ -127,6 +127,7 @@ module.exports = React.createClass({
newVersion: null,
hasNewVersion: false,
newVersionReleaseNotes: null,
+ checkingForUpdate: false,
// The username to default to when upgrading an account from a guest
upgradeUsername: null,
@@ -527,6 +528,9 @@ module.exports = React.createClass({
payload.releaseNotes,
);
break;
+ case 'check_updates':
+ this.setState({ checkingForUpdate: payload.value });
+ break;
}
},
@@ -1107,6 +1111,7 @@ module.exports = React.createClass({
newVersion: latest,
hasNewVersion: current !== latest,
newVersionReleaseNotes: releaseNotes,
+ checkingForUpdate: false,
});
},
diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js
index 89debcb461..e914f64859 100644
--- a/src/components/structures/UserSettings.js
+++ b/src/components/structures/UserSettings.js
@@ -854,6 +854,27 @@ module.exports = React.createClass({
;
},
+ _onCheckUpdates: function() {
+ dis.dispatch({
+ action: 'check_updates',
+ value: true,
+ });
+ },
+
+ _renderCheckUpdate: function() {
+ const platform = PlatformPeg.get();
+ if ('canSelfUpdate' in platform && platform.canSelfUpdate()) {
+ return
;
+ }
+ },
+
_renderBulkOptions: function() {
const invitedRooms = MatrixClientPeg.get().getRooms().filter((r) => {
return r.hasMembershipState(this._me, "invite");
@@ -1246,6 +1267,8 @@ module.exports = React.createClass({
+ {this._renderCheckUpdate()}
+
{this._renderClearCache()}
{this._renderDeactivateAccount()}