You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
More code reuse
This commit is contained in:
@@ -319,14 +319,15 @@ export default class AppTile extends React.Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.setState({deleting: true});
|
this.setState({deleting: true});
|
||||||
MatrixClientPeg.get().sendStateEvent(
|
|
||||||
this.props.room.roomId,
|
WidgetUtils.setRoomWidget(
|
||||||
'im.vector.modular.widgets',
|
|
||||||
{}, // empty content
|
|
||||||
this.props.id,
|
this.props.id,
|
||||||
).then(() => {
|
null,
|
||||||
return WidgetUtils.waitForRoomWidget(this.props.id, this.props.room.roomId, false);
|
null,
|
||||||
}).catch((e) => {
|
null,
|
||||||
|
null,
|
||||||
|
this.props.room.roomId,
|
||||||
|
).catch((e) => {
|
||||||
console.error('Failed to delete widget', e);
|
console.error('Failed to delete widget', e);
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.setState({deleting: false});
|
this.setState({deleting: false});
|
||||||
|
|||||||
Reference in New Issue
Block a user