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}
|
releaseNotes={this.props.newVersionReleaseNotes}
|
||||||
/>;
|
/>;
|
||||||
} else if (this.props.checkingForUpdate) {
|
} else if (this.props.checkingForUpdate) {
|
||||||
topBar = <UpdateCheckBar />;
|
topBar = <UpdateCheckBar {...this.props.checkingForUpdate} />;
|
||||||
} else if (this.props.matrixClient.isGuest()) {
|
} else if (this.props.matrixClient.isGuest()) {
|
||||||
topBar = <GuestWarningBar />;
|
topBar = <GuestWarningBar />;
|
||||||
} else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
|
} else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
|
||||||
|
|
|
@ -127,7 +127,7 @@ module.exports = React.createClass({
|
||||||
newVersion: null,
|
newVersion: null,
|
||||||
hasNewVersion: false,
|
hasNewVersion: false,
|
||||||
newVersionReleaseNotes: null,
|
newVersionReleaseNotes: null,
|
||||||
checkingForUpdate: false,
|
checkingForUpdate: null,
|
||||||
|
|
||||||
// The username to default to when upgrading an account from a guest
|
// The username to default to when upgrading an account from a guest
|
||||||
upgradeUsername: null,
|
upgradeUsername: null,
|
||||||
|
@ -1111,7 +1111,7 @@ module.exports = React.createClass({
|
||||||
newVersion: latest,
|
newVersion: latest,
|
||||||
hasNewVersion: current !== latest,
|
hasNewVersion: current !== latest,
|
||||||
newVersionReleaseNotes: releaseNotes,
|
newVersionReleaseNotes: releaseNotes,
|
||||||
checkingForUpdate: false,
|
checkingForUpdate: null,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -854,20 +854,13 @@ module.exports = React.createClass({
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCheckUpdates: function() {
|
|
||||||
dis.dispatch({
|
|
||||||
action: 'check_updates',
|
|
||||||
value: true,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_renderCheckUpdate: function() {
|
_renderCheckUpdate: function() {
|
||||||
const platform = PlatformPeg.get();
|
const platform = PlatformPeg.get();
|
||||||
if ('canSelfUpdate' in platform && platform.canSelfUpdate()) {
|
if ('canSelfUpdate' in platform && platform.canSelfUpdate() && 'startUpdateCheck' in platform) {
|
||||||
return <div>
|
return <div>
|
||||||
<h3>{_t('Updates')}</h3>
|
<h3>{_t('Updates')}</h3>
|
||||||
<div className="mx_UserSettings_section">
|
<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')}
|
{_t('Check for update')}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue