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
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E
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();
}
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 });