Factor out `_closeSettings` for cleanliness

pull/21833/head
Luke Barnard 2018-04-10 13:28:42 +01:00
parent 24d4df87d1
commit de1073aacb
1 changed files with 5 additions and 1 deletions

View File

@ -468,7 +468,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});
},
@ -566,6 +566,10 @@ export default React.createClass({
},
_onCancelClick: function() {
this._closeSettings();
},
_closeSettings() {
this.setState({
editing: false,
profileForm: null,