fix(recording): return true to close stop recording modal on cancel (#2776)

This commit is contained in:
virtuacoplenny 2018-04-10 13:51:49 -07:00 committed by Aaron van Meerten
parent ea1aef0703
commit f34686afee
1 changed files with 14 additions and 1 deletions

View File

@ -44,6 +44,7 @@ class StopLiveStreamDialog extends Component {
super(props);
// Bind event handler so it is only bound once for every instance.
this._onCancel = this._onCancel.bind(this);
this._onSubmit = this._onSubmit.bind(this);
}
@ -57,7 +58,7 @@ class StopLiveStreamDialog extends Component {
return (
<Dialog
okTitleKey = 'dialog.stopLiveStreaming'
onCancel = { this.props.onCancel }
onCancel = { this._onCancel }
onSubmit = { this._onSubmit }
titleKey = 'dialog.liveStreaming'
width = 'small'>
@ -66,6 +67,18 @@ class StopLiveStreamDialog extends Component {
);
}
/**
* Callback invoked when stopping of live streaming is canceled.
*
* @private
* @returns {boolean} True to close the modal.
*/
_onCancel() {
this.props.onCancel();
return true;
}
/**
* Callback invoked when stopping of live streaming is confirmed.
*