Fix bug where cross-signing keys would be unintentionally reset

Don't pass the boostrap function directly as a an event handler
as that gets used as the force argument.
This commit is contained in:
David Baker 2020-03-19 20:40:08 +00:00
parent 32f70dfec1
commit 9bfc19f367

View file

@ -60,6 +60,10 @@ export default class CrossSigningPanel extends React.PureComponent {
}
};
_onBootstrapClick = () => {
this._bootstrapSecureSecretStorage(false);
};
onStatusChanged = () => {
this._getUpdatedStatus();
};
@ -175,7 +179,7 @@ export default class CrossSigningPanel extends React.PureComponent {
) {
bootstrapButton = (
<div className="mx_CrossSigningPanel_buttonRow">
<AccessibleButton kind="primary" onClick={this._bootstrapSecureSecretStorage}>
<AccessibleButton kind="primary" onClick={this._onBootstrapClick}>
{_t("Bootstrap cross-signing and secret storage")}
</AccessibleButton>
</div>