From 6ead97c7a6979bda915dc09aae23924b22f639b3 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 11 Jun 2017 19:12:40 +0100 Subject: [PATCH] change interface to UpdateCheckBar and change launching mechanism Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/LoggedInView.js | 2 +- src/components/structures/MatrixChat.js | 4 ++-- src/components/structures/UserSettings.js | 11 ++--------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index f42c752bb9..f916e28024 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -256,7 +256,7 @@ export default React.createClass({ releaseNotes={this.props.newVersionReleaseNotes} />; } else if (this.props.checkingForUpdate) { - topBar = ; + topBar = ; } else if (this.props.matrixClient.isGuest()) { topBar = ; } else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) { diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 706f7d35dd..6294201e13 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -127,7 +127,7 @@ module.exports = React.createClass({ newVersion: null, hasNewVersion: false, newVersionReleaseNotes: null, - checkingForUpdate: false, + checkingForUpdate: null, // The username to default to when upgrading an account from a guest upgradeUsername: null, @@ -1111,7 +1111,7 @@ module.exports = React.createClass({ newVersion: latest, hasNewVersion: current !== latest, newVersionReleaseNotes: releaseNotes, - checkingForUpdate: false, + checkingForUpdate: null, }); }, diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 5af1ed42c6..a2d9df4900 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -854,20 +854,13 @@ 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()) { + if ('canSelfUpdate' in platform && platform.canSelfUpdate() && 'startUpdateCheck' in platform) { return

{_t('Updates')}

- + {_t('Check for update')}