1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

remove commented code and move modal.close into a finally block

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2018-06-14 13:53:02 +01:00
parent 9dd2184b33
commit 4e216714b5
2 changed files with 3 additions and 3 deletions

View File

@ -58,14 +58,15 @@ export default class GroupInviteTileContextMenu extends React.Component {
try {
await GroupStore.leaveGroup(this.props.group.groupId);
} catch (e) {
console.error(e);
console.error("Error rejecting community invite: ", e);
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createTrackedDialog('Error rejecting invite', '', ErrorDialog, {
title: _t("Error"),
description: _t("Unable to reject invite"),
});
}
} finally {
modal.close();
}
},
});

View File

@ -94,7 +94,6 @@ export default React.createClass({
group: this.props.group,
onFinished: () => {
this.setState({ menuDisplayed: false });
// this.props.refreshSubList();
},
});
this.setState({ menuDisplayed: true });