Load submit-rageshake asynchronously
... because it's 250K :/
This commit is contained in:
parent
a34b5abc82
commit
269f9a5ccc
1 changed files with 11 additions and 9 deletions
|
@ -16,7 +16,6 @@ limitations under the License.
|
|||
|
||||
import React from 'react';
|
||||
import sdk from 'matrix-react-sdk';
|
||||
import submit_rageshake from '../../../vector/submit-rageshake';
|
||||
import SdkConfig from 'matrix-react-sdk/lib/SdkConfig';
|
||||
|
||||
export default class BugReportDialog extends React.Component {
|
||||
|
@ -48,7 +47,9 @@ export default class BugReportDialog extends React.Component {
|
|||
return;
|
||||
}
|
||||
this.setState({ busy: true, err: null });
|
||||
submit_rageshake(SdkConfig.get().bug_report_endpoint_url, {
|
||||
|
||||
require(['../../../vector/submit-rageshake'], (s) => {
|
||||
s(SdkConfig.get().bug_report_endpoint_url, {
|
||||
userText: userText,
|
||||
sendLogs: sendLogs,
|
||||
}).then(() => {
|
||||
|
@ -57,6 +58,7 @@ export default class BugReportDialog extends React.Component {
|
|||
}, (err) => {
|
||||
this.setState({ busy: false, err: `Failed: ${err.message}` });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
_onTextChange(ev) {
|
||||
|
|
Loading…
Reference in a new issue