@ -41,7 +41,7 @@ import { initMuteModal } from 'flavours/glitch/actions/mutes';
import { initBlockModal } from 'flavours/glitch/actions/blocks' ;
import { initBlockModal } from 'flavours/glitch/actions/blocks' ;
import { initReport } from 'flavours/glitch/actions/reports' ;
import { initReport } from 'flavours/glitch/actions/reports' ;
import { initBoostModal } from 'flavours/glitch/actions/boosts' ;
import { initBoostModal } from 'flavours/glitch/actions/boosts' ;
import { makeGetStatus } from 'flavours/glitch/selectors' ;
import { makeGetStatus , makeGetPictureInPicture } from 'flavours/glitch/selectors' ;
import ScrollContainer from 'flavours/glitch/containers/scroll_container' ;
import ScrollContainer from 'flavours/glitch/containers/scroll_container' ;
import ColumnBackButton from 'flavours/glitch/components/column_back_button' ;
import ColumnBackButton from 'flavours/glitch/components/column_back_button' ;
import ColumnHeader from '../../components/column_header' ;
import ColumnHeader from '../../components/column_header' ;
@ -72,6 +72,7 @@ const messages = defineMessages({
const makeMapStateToProps = ( ) => {
const makeMapStateToProps = ( ) => {
const getStatus = makeGetStatus ( ) ;
const getStatus = makeGetStatus ( ) ;
const getPictureInPicture = makeGetPictureInPicture ( ) ;
const getAncestorsIds = createSelector ( [
const getAncestorsIds = createSelector ( [
( _ , { id } ) => id ,
( _ , { id } ) => id ,
@ -129,6 +130,7 @@ const makeMapStateToProps = () => {
const mapStateToProps = ( state , props ) => {
const mapStateToProps = ( state , props ) => {
const status = getStatus ( state , { id : props . params . statusId } ) ;
const status = getStatus ( state , { id : props . params . statusId } ) ;
let ancestorsIds = Immutable . List ( ) ;
let ancestorsIds = Immutable . List ( ) ;
let descendantsIds = Immutable . List ( ) ;
let descendantsIds = Immutable . List ( ) ;
@ -145,7 +147,7 @@ const makeMapStateToProps = () => {
settings : state . get ( 'local_settings' ) ,
settings : state . get ( 'local_settings' ) ,
askReplyConfirmation : state . getIn ( [ 'local_settings' , 'confirm_before_clearing_draft' ] ) && state . getIn ( [ 'compose' , 'text' ] ) . trim ( ) . length !== 0 ,
askReplyConfirmation : state . getIn ( [ 'local_settings' , 'confirm_before_clearing_draft' ] ) && state . getIn ( [ 'compose' , 'text' ] ) . trim ( ) . length !== 0 ,
domain : state . getIn ( [ 'meta' , 'domain' ] ) ,
domain : state . getIn ( [ 'meta' , 'domain' ] ) ,
usingPiP: state . get ( 'picture_in_picture' ) . statusId === props . params . statusId ,
pictureInPicture: getPictureInPicture ( state , { id : props . params . statusId } ) ,
} ;
} ;
} ;
} ;
@ -190,7 +192,10 @@ class Status extends ImmutablePureComponent {
askReplyConfirmation : PropTypes . bool ,
askReplyConfirmation : PropTypes . bool ,
multiColumn : PropTypes . bool ,
multiColumn : PropTypes . bool ,
domain : PropTypes . string . isRequired ,
domain : PropTypes . string . isRequired ,
usingPiP : PropTypes . bool ,
pictureInPicture : ImmutablePropTypes . contains ( {
inUse : PropTypes . bool ,
available : PropTypes . bool ,
} ) ,
} ;
} ;
state = {
state = {
@ -604,7 +609,7 @@ class Status extends ImmutablePureComponent {
render ( ) {
render ( ) {
let ancestors , descendants ;
let ancestors , descendants ;
const { isLoading , status , settings , ancestorsIds , descendantsIds , intl , domain , multiColumn , usingPiP } = this . props ;
const { isLoading , status , settings , ancestorsIds , descendantsIds , intl , domain , multiColumn , pictureInPicture } = this . props ;
const { fullscreen } = this . state ;
const { fullscreen } = this . state ;
if ( isLoading ) {
if ( isLoading ) {
@ -682,7 +687,7 @@ class Status extends ImmutablePureComponent {
domain = { domain }
domain = { domain }
showMedia = { this . state . showMedia }
showMedia = { this . state . showMedia }
onToggleMediaVisibility = { this . handleToggleMediaVisibility }
onToggleMediaVisibility = { this . handleToggleMediaVisibility }
usingPiP= { usingPiP }
pictureInPicture= { pictureInPicture }
/ >
/ >
< ActionBar
< ActionBar