change interface to UpdateCheckBar and change launching mechanism

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-06-11 19:12:40 +01:00
parent 98e99d542b
commit 6ead97c7a6
3 changed files with 5 additions and 12 deletions

View file

@ -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>