@ -233,7 +233,7 @@ class Status extends ImmutablePureComponent {
handleToggleMediaVisibility = ( ) => {
handleToggleMediaVisibility = ( ) => {
this . setState ( { showMedia : ! this . state . showMedia } ) ;
this . setState ( { showMedia : ! this . state . showMedia } ) ;
}
} ;
handleFavouriteClick = ( status ) => {
handleFavouriteClick = ( status ) => {
const { dispatch } = this . props ;
const { dispatch } = this . props ;
@ -252,7 +252,7 @@ class Status extends ImmutablePureComponent {
url : status . get ( 'url' ) ,
url : status . get ( 'url' ) ,
} ) ) ;
} ) ) ;
}
}
}
} ;
handlePin = ( status ) => {
handlePin = ( status ) => {
if ( status . get ( 'pinned' ) ) {
if ( status . get ( 'pinned' ) ) {
@ -260,7 +260,7 @@ class Status extends ImmutablePureComponent {
} else {
} else {
this . props . dispatch ( pin ( status ) ) ;
this . props . dispatch ( pin ( status ) ) ;
}
}
}
} ;
handleReplyClick = ( status ) => {
handleReplyClick = ( status ) => {
const { askReplyConfirmation , dispatch , intl } = this . props ;
const { askReplyConfirmation , dispatch , intl } = this . props ;
@ -283,11 +283,11 @@ class Status extends ImmutablePureComponent {
url : status . get ( 'url' ) ,
url : status . get ( 'url' ) ,
} ) ) ;
} ) ) ;
}
}
}
} ;
handleModalReblog = ( status , privacy ) => {
handleModalReblog = ( status , privacy ) => {
this . props . dispatch ( reblog ( status , privacy ) ) ;
this . props . dispatch ( reblog ( status , privacy ) ) ;
}
} ;
handleReblogClick = ( status , e ) => {
handleReblogClick = ( status , e ) => {
const { dispatch } = this . props ;
const { dispatch } = this . props ;
@ -310,7 +310,7 @@ class Status extends ImmutablePureComponent {
url : status . get ( 'url' ) ,
url : status . get ( 'url' ) ,
} ) ) ;
} ) ) ;
}
}
}
} ;
handleBookmarkClick = ( status ) => {
handleBookmarkClick = ( status ) => {
if ( status . get ( 'bookmarked' ) ) {
if ( status . get ( 'bookmarked' ) ) {
@ -318,7 +318,7 @@ class Status extends ImmutablePureComponent {
} else {
} else {
this . props . dispatch ( bookmark ( status ) ) ;
this . props . dispatch ( bookmark ( status ) ) ;
}
}
}
} ;
handleDeleteClick = ( status , history , withRedraft = false ) => {
handleDeleteClick = ( status , history , withRedraft = false ) => {
const { dispatch , intl } = this . props ;
const { dispatch , intl } = this . props ;
@ -332,27 +332,27 @@ class Status extends ImmutablePureComponent {
onConfirm : ( ) => dispatch ( deleteStatus ( status . get ( 'id' ) , history , withRedraft ) ) ,
onConfirm : ( ) => dispatch ( deleteStatus ( status . get ( 'id' ) , history , withRedraft ) ) ,
} ) ) ;
} ) ) ;
}
}
}
} ;
handleEditClick = ( status , history ) => {
handleEditClick = ( status , history ) => {
this . props . dispatch ( editStatus ( status . get ( 'id' ) , history ) ) ;
this . props . dispatch ( editStatus ( status . get ( 'id' ) , history ) ) ;
}
} ;
handleDirectClick = ( account , router ) => {
handleDirectClick = ( account , router ) => {
this . props . dispatch ( directCompose ( account , router ) ) ;
this . props . dispatch ( directCompose ( account , router ) ) ;
}
} ;
handleMentionClick = ( account , router ) => {
handleMentionClick = ( account , router ) => {
this . props . dispatch ( mentionCompose ( account , router ) ) ;
this . props . dispatch ( mentionCompose ( account , router ) ) ;
}
} ;
handleOpenMedia = ( media , index ) => {
handleOpenMedia = ( media , index ) => {
this . props . dispatch ( openModal ( 'MEDIA' , { statusId : this . props . status . get ( 'id' ) , media , index } ) ) ;
this . props . dispatch ( openModal ( 'MEDIA' , { statusId : this . props . status . get ( 'id' ) , media , index } ) ) ;
}
} ;
handleOpenVideo = ( media , options ) => {
handleOpenVideo = ( media , options ) => {
this . props . dispatch ( openModal ( 'VIDEO' , { statusId : this . props . status . get ( 'id' ) , media , options } ) ) ;
this . props . dispatch ( openModal ( 'VIDEO' , { statusId : this . props . status . get ( 'id' ) , media , options } ) ) ;
}
} ;
handleHotkeyOpenMedia = e => {
handleHotkeyOpenMedia = e => {
const { status } = this . props ;
const { status } = this . props ;
@ -366,11 +366,11 @@ class Status extends ImmutablePureComponent {
this . handleOpenMedia ( status . get ( 'media_attachments' ) , 0 ) ;
this . handleOpenMedia ( status . get ( 'media_attachments' ) , 0 ) ;
}
}
}
}
}
} ;
handleMuteClick = ( account ) => {
handleMuteClick = ( account ) => {
this . props . dispatch ( initMuteModal ( account ) ) ;
this . props . dispatch ( initMuteModal ( account ) ) ;
}
} ;
handleConversationMuteClick = ( status ) => {
handleConversationMuteClick = ( status ) => {
if ( status . get ( 'muted' ) ) {
if ( status . get ( 'muted' ) ) {
@ -378,7 +378,7 @@ class Status extends ImmutablePureComponent {
} else {
} else {
this . props . dispatch ( muteStatus ( status . get ( 'id' ) ) ) ;
this . props . dispatch ( muteStatus ( status . get ( 'id' ) ) ) ;
}
}
}
} ;
handleToggleHidden = ( status ) => {
handleToggleHidden = ( status ) => {
if ( status . get ( 'hidden' ) ) {
if ( status . get ( 'hidden' ) ) {
@ -386,7 +386,7 @@ class Status extends ImmutablePureComponent {
} else {
} else {
this . props . dispatch ( hideStatus ( status . get ( 'id' ) ) ) ;
this . props . dispatch ( hideStatus ( status . get ( 'id' ) ) ) ;
}
}
}
} ;
handleToggleAll = ( ) => {
handleToggleAll = ( ) => {
const { status , ancestorsIds , descendantsIds } = this . props ;
const { status , ancestorsIds , descendantsIds } = this . props ;
@ -397,7 +397,7 @@ class Status extends ImmutablePureComponent {
} else {
} else {
this . props . dispatch ( hideStatus ( statusIds ) ) ;
this . props . dispatch ( hideStatus ( statusIds ) ) ;
}
}
}
} ;
handleTranslate = status => {
handleTranslate = status => {
const { dispatch } = this . props ;
const { dispatch } = this . props ;
@ -407,29 +407,29 @@ class Status extends ImmutablePureComponent {
} else {
} else {
dispatch ( translateStatus ( status . get ( 'id' ) ) ) ;
dispatch ( translateStatus ( status . get ( 'id' ) ) ) ;
}
}
}
} ;
handleBlockClick = ( status ) => {
handleBlockClick = ( status ) => {
const { dispatch } = this . props ;
const { dispatch } = this . props ;
const account = status . get ( 'account' ) ;
const account = status . get ( 'account' ) ;
dispatch ( initBlockModal ( account ) ) ;
dispatch ( initBlockModal ( account ) ) ;
}
} ;
handleReport = ( status ) => {
handleReport = ( status ) => {
this . props . dispatch ( initReport ( status . get ( 'account' ) , status ) ) ;
this . props . dispatch ( initReport ( status . get ( 'account' ) , status ) ) ;
}
} ;
handleEmbed = ( status ) => {
handleEmbed = ( status ) => {
this . props . dispatch ( openModal ( 'EMBED' , { url : status . get ( 'url' ) } ) ) ;
this . props . dispatch ( openModal ( 'EMBED' , { url : status . get ( 'url' ) } ) ) ;
}
} ;
handleUnmuteClick = account => {
handleUnmuteClick = account => {
this . props . dispatch ( unmuteAccount ( account . get ( 'id' ) ) ) ;
this . props . dispatch ( unmuteAccount ( account . get ( 'id' ) ) ) ;
}
} ;
handleUnblockClick = account => {
handleUnblockClick = account => {
this . props . dispatch ( unblockAccount ( account . get ( 'id' ) ) ) ;
this . props . dispatch ( unblockAccount ( account . get ( 'id' ) ) ) ;
}
} ;
handleBlockDomainClick = domain => {
handleBlockDomainClick = domain => {
this . props . dispatch ( openModal ( 'CONFIRM' , {
this . props . dispatch ( openModal ( 'CONFIRM' , {
@ -437,50 +437,50 @@ class Status extends ImmutablePureComponent {
confirm : this . props . intl . formatMessage ( messages . blockDomainConfirm ) ,
confirm : this . props . intl . formatMessage ( messages . blockDomainConfirm ) ,
onConfirm : ( ) => this . props . dispatch ( blockDomain ( domain ) ) ,
onConfirm : ( ) => this . props . dispatch ( blockDomain ( domain ) ) ,
} ) ) ;
} ) ) ;
}
} ;
handleUnblockDomainClick = domain => {
handleUnblockDomainClick = domain => {
this . props . dispatch ( unblockDomain ( domain ) ) ;
this . props . dispatch ( unblockDomain ( domain ) ) ;
}
} ;
handleHotkeyMoveUp = ( ) => {
handleHotkeyMoveUp = ( ) => {
this . handleMoveUp ( this . props . status . get ( 'id' ) ) ;
this . handleMoveUp ( this . props . status . get ( 'id' ) ) ;
}
} ;
handleHotkeyMoveDown = ( ) => {
handleHotkeyMoveDown = ( ) => {
this . handleMoveDown ( this . props . status . get ( 'id' ) ) ;
this . handleMoveDown ( this . props . status . get ( 'id' ) ) ;
}
} ;
handleHotkeyReply = e => {
handleHotkeyReply = e => {
e . preventDefault ( ) ;
e . preventDefault ( ) ;
this . handleReplyClick ( this . props . status ) ;
this . handleReplyClick ( this . props . status ) ;
}
} ;
handleHotkeyFavourite = ( ) => {
handleHotkeyFavourite = ( ) => {
this . handleFavouriteClick ( this . props . status ) ;
this . handleFavouriteClick ( this . props . status ) ;
}
} ;
handleHotkeyBoost = ( ) => {
handleHotkeyBoost = ( ) => {
this . handleReblogClick ( this . props . status ) ;
this . handleReblogClick ( this . props . status ) ;
}
} ;
handleHotkeyMention = e => {
handleHotkeyMention = e => {
e . preventDefault ( ) ;
e . preventDefault ( ) ;
this . handleMentionClick ( this . props . status . get ( 'account' ) ) ;
this . handleMentionClick ( this . props . status . get ( 'account' ) ) ;
}
} ;
handleHotkeyOpenProfile = ( ) => {
handleHotkeyOpenProfile = ( ) => {
this . context . router . history . push ( ` /@ ${ this . props . status . getIn ( [ 'account' , 'acct' ] ) } ` ) ;
this . context . router . history . push ( ` /@ ${ this . props . status . getIn ( [ 'account' , 'acct' ] ) } ` ) ;
}
} ;
handleHotkeyToggleHidden = ( ) => {
handleHotkeyToggleHidden = ( ) => {
this . handleToggleHidden ( this . props . status ) ;
this . handleToggleHidden ( this . props . status ) ;
}
} ;
handleHotkeyToggleSensitive = ( ) => {
handleHotkeyToggleSensitive = ( ) => {
this . handleToggleMediaVisibility ( ) ;
this . handleToggleMediaVisibility ( ) ;
}
} ;
handleMoveUp = id => {
handleMoveUp = id => {
const { status , ancestorsIds , descendantsIds } = this . props ;
const { status , ancestorsIds , descendantsIds } = this . props ;
@ -497,7 +497,7 @@ class Status extends ImmutablePureComponent {
this . _selectChild ( index - 1 , true ) ;
this . _selectChild ( index - 1 , true ) ;
}
}
}
}
}
} ;
handleMoveDown = id => {
handleMoveDown = id => {
const { status , ancestorsIds , descendantsIds } = this . props ;
const { status , ancestorsIds , descendantsIds } = this . props ;
@ -514,7 +514,7 @@ class Status extends ImmutablePureComponent {
this . _selectChild ( index + 1 , false ) ;
this . _selectChild ( index + 1 , false ) ;
}
}
}
}
}
} ;
_selectChild ( index , align _top ) {
_selectChild ( index , align _top ) {
const container = this . node ;
const container = this . node ;
@ -544,7 +544,7 @@ class Status extends ImmutablePureComponent {
setRef = c => {
setRef = c => {
this . node = c ;
this . node = c ;
}
} ;
componentDidUpdate ( ) {
componentDidUpdate ( ) {
if ( this . _scrolledIntoView ) {
if ( this . _scrolledIntoView ) {
@ -569,7 +569,7 @@ class Status extends ImmutablePureComponent {
onFullScreenChange = ( ) => {
onFullScreenChange = ( ) => {
this . setState ( { fullscreen : isFullscreen ( ) } ) ;
this . setState ( { fullscreen : isFullscreen ( ) } ) ;
}
} ;
render ( ) {
render ( ) {
let ancestors , descendants ;
let ancestors , descendants ;