Bläddra i källkod

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

master
virtuacoplenny 7 år sedan
förälder
incheckning
f34686afee

+ 14
- 1
react/features/recording/components/LiveStream/StopLiveStreamDialog.web.js Visa fil

@@ -44,6 +44,7 @@ class StopLiveStreamDialog extends Component {
44 44
         super(props);
45 45
 
46 46
         // Bind event handler so it is only bound once for every instance.
47
+        this._onCancel = this._onCancel.bind(this);
47 48
         this._onSubmit = this._onSubmit.bind(this);
48 49
     }
49 50
 
@@ -57,7 +58,7 @@ class StopLiveStreamDialog extends Component {
57 58
         return (
58 59
             <Dialog
59 60
                 okTitleKey = 'dialog.stopLiveStreaming'
60
-                onCancel = { this.props.onCancel }
61
+                onCancel = { this._onCancel }
61 62
                 onSubmit = { this._onSubmit }
62 63
                 titleKey = 'dialog.liveStreaming'
63 64
                 width = 'small'>
@@ -66,6 +67,18 @@ class StopLiveStreamDialog extends Component {
66 67
         );
67 68
     }
68 69
 
70
+    /**
71
+     * Callback invoked when stopping of live streaming is canceled.
72
+     *
73
+     * @private
74
+     * @returns {boolean} True to close the modal.
75
+     */
76
+    _onCancel() {
77
+        this.props.onCancel();
78
+
79
+        return true;
80
+    }
81
+
69 82
     /**
70 83
      * Callback invoked when stopping of live streaming is confirmed.
71 84
      *

Laddar…
Avbryt
Spara