@@ -67,15 +67,15 @@ module.exports = React.createClass({
6767
6868 onResendClick : function ( ) {
6969 Resend . resend ( this . props . mxEvent ) ;
70- if ( this . props . onFinished ) this . props . onFinished ( ) ;
70+ this . closeMenu ( ) ;
7171 } ,
7272
7373 onViewSourceClick : function ( ) {
7474 const ViewSource = sdk . getComponent ( 'structures.ViewSource' ) ;
7575 Modal . createDialog ( ViewSource , {
7676 content : this . props . mxEvent . event ,
7777 } , 'mx_Dialog_viewsource' ) ;
78- if ( this . props . onFinished ) this . props . onFinished ( ) ;
78+ this . closeMenu ( ) ;
7979 } ,
8080
8181 onViewClearSourceClick : function ( ) {
@@ -84,7 +84,7 @@ module.exports = React.createClass({
8484 // FIXME: _clearEvent is private
8585 content : this . props . mxEvent . _clearEvent ,
8686 } , 'mx_Dialog_viewsource' ) ;
87- if ( this . props . onFinished ) this . props . onFinished ( ) ;
87+ this . closeMenu ( ) ;
8888 } ,
8989
9090 onRedactClick : function ( ) {
@@ -106,12 +106,12 @@ module.exports = React.createClass({
106106 } ) . done ( ) ;
107107 } ,
108108 } , 'mx_Dialog_confirmredact' ) ;
109- if ( this . props . onFinished ) this . props . onFinished ( ) ;
109+ this . closeMenu ( ) ;
110110 } ,
111111
112112 onCancelSendClick : function ( ) {
113113 Resend . removeFromQueue ( this . props . mxEvent ) ;
114- if ( this . props . onFinished ) this . props . onFinished ( ) ;
114+ this . closeMenu ( ) ;
115115 } ,
116116
117117 onForwardClick : function ( ) {
@@ -130,7 +130,7 @@ module.exports = React.createClass({
130130 if ( this . props . eventTileOps ) {
131131 this . props . eventTileOps . unhideWidget ( ) ;
132132 }
133- if ( this . props . onFinished ) this . props . onFinished ( ) ;
133+ this . closeMenu ( ) ;
134134 } ,
135135
136136 onQuoteClick : function ( ) {
@@ -139,6 +139,7 @@ module.exports = React.createClass({
139139 action : 'quote' ,
140140 event : this . props . mxEvent ,
141141 } ) ;
142+ this . closeMenu ( ) ;
142143 } ,
143144
144145 render : function ( ) {
0 commit comments