Merge pull request #2291 from matrix-org/dbkr/create_key_backup_async

Make create key backup dialog async
This commit is contained in:
David Baker 2018-11-23 11:19:23 +00:00 committed by GitHub
commit 0c6e98548e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 7 deletions

View file

@ -59,8 +59,14 @@ export default React.createClass({
_onResetRecoveryClick: function() {
this.props.onFinished(false);
const CreateKeyBackupDialog = sdk.getComponent("dialogs.keybackup.CreateKeyBackupDialog");
Modal.createTrackedDialog('Create Key Backup', '', CreateKeyBackupDialog, {});
Modal.createTrackedDialogAsync('Key Backup', 'Key Backup',
import('../../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'),
{
onFinished: () => {
this._loadBackupStatus();
},
},
);
},
_onRecoveryKeyChange: function(e) {

View file

@ -80,12 +80,14 @@ export default class KeyBackupPanel extends React.Component {
}
_startNewBackup() {
const CreateKeyBackupDialog = sdk.getComponent('dialogs.keybackup.CreateKeyBackupDialog');
Modal.createTrackedDialog('Key Backup', 'Key Backup', CreateKeyBackupDialog, {
Modal.createTrackedDialogAsync('Key Backup', 'Key Backup',
import('../../../async-components/views/dialogs/keybackup/CreateKeyBackupDialog'),
{
onFinished: () => {
this._loadBackupStatus();
},
});
},
);
}
_deleteBackup() {