mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Merge pull request #614 from matrix-org/kegan/show-error-on-pl-change-fail
Show the error dialog when requests to PUT power levels fail
This commit is contained in:
commit
07b3c58c61
@ -376,6 +376,7 @@ module.exports = WithMatrixClient(React.createClass({
|
|||||||
// get out of sync if we force setState here!
|
// get out of sync if we force setState here!
|
||||||
console.log("Power change success");
|
console.log("Power change success");
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
|
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failure to change power level",
|
title: "Failure to change power level",
|
||||||
description: err.message
|
description: err.message
|
||||||
@ -383,7 +384,7 @@ module.exports = WithMatrixClient(React.createClass({
|
|||||||
}
|
}
|
||||||
).finally(()=>{
|
).finally(()=>{
|
||||||
this.setState({ updating: this.state.updating - 1 });
|
this.setState({ updating: this.state.updating - 1 });
|
||||||
});
|
}).done();
|
||||||
this.props.onFinished();
|
this.props.onFinished();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user