@ -48,6 +48,7 @@ const makeMapStateToProps = () => {
descendantsIds : state . getIn ( [ 'timelines' , 'descendants' , Number ( props . params . statusId ) ] ) ,
descendantsIds : state . getIn ( [ 'timelines' , 'descendants' , Number ( props . params . statusId ) ] ) ,
me : state . getIn ( [ 'meta' , 'me' ] ) ,
me : state . getIn ( [ 'meta' , 'me' ] ) ,
boostModal : state . getIn ( [ 'meta' , 'boost_modal' ] ) ,
boostModal : state . getIn ( [ 'meta' , 'boost_modal' ] ) ,
deleteModal : state . getIn ( [ 'meta' , 'delete_modal' ] ) ,
autoPlayGif : state . getIn ( [ 'meta' , 'auto_play_gif' ] ) ,
autoPlayGif : state . getIn ( [ 'meta' , 'auto_play_gif' ] ) ,
} ) ;
} ) ;
@ -68,6 +69,7 @@ class Status extends ImmutablePureComponent {
descendantsIds : ImmutablePropTypes . list ,
descendantsIds : ImmutablePropTypes . list ,
me : PropTypes . number ,
me : PropTypes . number ,
boostModal : PropTypes . bool ,
boostModal : PropTypes . bool ,
deleteModal : PropTypes . bool ,
autoPlayGif : PropTypes . bool ,
autoPlayGif : PropTypes . bool ,
intl : PropTypes . object . isRequired ,
intl : PropTypes . object . isRequired ,
} ;
} ;
@ -113,12 +115,16 @@ class Status extends ImmutablePureComponent {
handleDeleteClick = ( status ) => {
handleDeleteClick = ( status ) => {
const { dispatch , intl } = this . props ;
const { dispatch , intl } = this . props ;
if ( ! this . props . deleteModal ) {
dispatch ( deleteStatus ( status . get ( 'id' ) ) ) ;
} else {
dispatch ( openModal ( 'CONFIRM' , {
dispatch ( openModal ( 'CONFIRM' , {
message : intl . formatMessage ( messages . deleteMessage ) ,
message : intl . formatMessage ( messages . deleteMessage ) ,
confirm : intl . formatMessage ( messages . deleteConfirm ) ,
confirm : intl . formatMessage ( messages . deleteConfirm ) ,
onConfirm : ( ) => dispatch ( deleteStatus ( status . get ( 'id' ) ) ) ,
onConfirm : ( ) => dispatch ( deleteStatus ( status . get ( 'id' ) ) ) ,
} ) ) ;
} ) ) ;
}
}
}
handleMentionClick = ( account , router ) => {
handleMentionClick = ( account , router ) => {
this . props . dispatch ( mentionCompose ( account , router ) ) ;
this . props . dispatch ( mentionCompose ( account , router ) ) ;