change interface to UpdateCheckBar and change launching mechanism
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
98e99d542b
commit
6ead97c7a6
3 changed files with 5 additions and 12 deletions
|
@ -256,7 +256,7 @@ export default React.createClass({
|
|||
releaseNotes={this.props.newVersionReleaseNotes}
|
||||
/>;
|
||||
} else if (this.props.checkingForUpdate) {
|
||||
topBar = <UpdateCheckBar />;
|
||||
topBar = <UpdateCheckBar {...this.props.checkingForUpdate} />;
|
||||
} else if (this.props.matrixClient.isGuest()) {
|
||||
topBar = <GuestWarningBar />;
|
||||
} else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -854,20 +854,13 @@ module.exports = React.createClass({
|
|||
</div>;
|
||||
},
|
||||
|
||||
_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 <div>
|
||||
<h3>{_t('Updates')}</h3>
|
||||
<div className="mx_UserSettings_section">
|
||||
<AccessibleButton className="mx_UserSettings_button" onClick={this._onCheckUpdates}>
|
||||
<AccessibleButton className="mx_UserSettings_button" onClick={platform.startUpdateCheck}>
|
||||
{_t('Check for update')}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue