@ -8,6 +8,7 @@ import { me } from '../../../initial_state';
const messages = defineMessages ( {
const messages = defineMessages ( {
delete : { id : 'status.delete' , defaultMessage : 'Delete' } ,
delete : { id : 'status.delete' , defaultMessage : 'Delete' } ,
redraft : { id : 'status.redraft' , defaultMessage : 'Delete & re-draft' } ,
direct : { id : 'status.direct' , defaultMessage : 'Direct message @{name}' } ,
direct : { id : 'status.direct' , defaultMessage : 'Direct message @{name}' } ,
mention : { id : 'status.mention' , defaultMessage : 'Mention @{name}' } ,
mention : { id : 'status.mention' , defaultMessage : 'Mention @{name}' } ,
reply : { id : 'status.reply' , defaultMessage : 'Reply' } ,
reply : { id : 'status.reply' , defaultMessage : 'Reply' } ,
@ -67,6 +68,10 @@ export default class ActionBar extends React.PureComponent {
this . props . onDelete ( this . props . status ) ;
this . props . onDelete ( this . props . status ) ;
}
}
handleRedraftClick = ( ) => {
this . props . onDelete ( this . props . status , true ) ;
}
handleDirectClick = ( ) => {
handleDirectClick = ( ) => {
this . props . onDirect ( this . props . status . get ( 'account' ) , this . context . router . history ) ;
this . props . onDirect ( this . props . status . get ( 'account' ) , this . context . router . history ) ;
}
}
@ -132,6 +137,7 @@ export default class ActionBar extends React.PureComponent {
menu . push ( { text : intl . formatMessage ( mutingConversation ? messages . unmuteConversation : messages . muteConversation ) , action : this . handleConversationMuteClick } ) ;
menu . push ( { text : intl . formatMessage ( mutingConversation ? messages . unmuteConversation : messages . muteConversation ) , action : this . handleConversationMuteClick } ) ;
menu . push ( null ) ;
menu . push ( null ) ;
menu . push ( { text : intl . formatMessage ( messages . delete ) , action : this . handleDeleteClick } ) ;
menu . push ( { text : intl . formatMessage ( messages . delete ) , action : this . handleDeleteClick } ) ;
menu . push ( { text : intl . formatMessage ( messages . redraft ) , action : this . handleRedraftClick } ) ;
} else {
} else {
menu . push ( { text : intl . formatMessage ( messages . mention , { name : status . getIn ( [ 'account' , 'username' ] ) } ) , action : this . handleMentionClick } ) ;
menu . push ( { text : intl . formatMessage ( messages . mention , { name : status . getIn ( [ 'account' , 'username' ] ) } ) , action : this . handleMentionClick } ) ;
menu . push ( { text : intl . formatMessage ( messages . direct , { name : status . getIn ( [ 'account' , 'username' ] ) } ) , action : this . handleDirectClick } ) ;
menu . push ( { text : intl . formatMessage ( messages . direct , { name : status . getIn ( [ 'account' , 'username' ] ) } ) , action : this . handleDirectClick } ) ;