Add error dialog if widget remove fails

Also up the timeout because matrix.org is that slow
This commit is contained in:
David Baker 2018-07-03 11:55:41 +01:00
parent 9d41b87678
commit c665ab8a22
3 changed files with 13 additions and 2 deletions

View file

@ -325,6 +325,12 @@ export default class AppTile extends React.Component {
this.props.id,
).catch((e) => {
console.error('Failed to delete widget', e);
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createTrackedDialog('Failed to remove widget', '', ErrorDialog, {
title: _t('Failed to remove widget'),
description: _t('An error ocurred whilst trying to remove the widget from the room'),
});
}).finally(() => {
this.setState({deleting: false});
});