From e616dbac3390ff7f8e0bf4d3d6a8c26edd7a139b Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 10 Apr 2018 13:28:42 +0100 Subject: [PATCH] Factor out `_closeSettings` for cleanliness --- src/components/structures/GroupView.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 47c6ab57ca..5ef627034c 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -469,7 +469,7 @@ export default React.createClass({ if (group.myMembership === 'leave') { // Leave settings - the user might have clicked the "Leave" button - this._onCancelClick(); + this._closeSettings(); } this.setState({membershipBusy: false}); }, @@ -567,6 +567,10 @@ export default React.createClass({ }, _onCancelClick: function() { + this._closeSettings(); + }, + + _closeSettings() { this.setState({ editing: false, profileForm: null,