|
|
@ -43,7 +43,7 @@ import {
|
|
|
|
import { initMuteModal } from '../../actions/mutes';
|
|
|
|
import { initMuteModal } from '../../actions/mutes';
|
|
|
|
import { initBlockModal } from '../../actions/blocks';
|
|
|
|
import { initBlockModal } from '../../actions/blocks';
|
|
|
|
import { initReport } from '../../actions/reports';
|
|
|
|
import { initReport } from '../../actions/reports';
|
|
|
|
import { makeGetStatus } from '../../selectors';
|
|
|
|
import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
|
|
|
|
import { ScrollContainer } from 'react-router-scroll-4';
|
|
|
|
import { ScrollContainer } from 'react-router-scroll-4';
|
|
|
|
import ColumnBackButton from '../../components/column_back_button';
|
|
|
|
import ColumnBackButton from '../../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();
|
|
|
|
|
|
|
|
|
|
|
@ -143,7 +145,7 @@ const makeMapStateToProps = () => {
|
|
|
|
descendantsIds,
|
|
|
|
descendantsIds,
|
|
|
|
askReplyConfirmation: state.getIn(['compose', 'text']).trim().length !== 0,
|
|
|
|
askReplyConfirmation: 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 }),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -168,7 +170,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 = {
|
|
|
@ -492,7 +497,7 @@ class Status extends ImmutablePureComponent {
|
|
|
|
|
|
|
|
|
|
|
|
render () {
|
|
|
|
render () {
|
|
|
|
let ancestors, descendants;
|
|
|
|
let ancestors, descendants;
|
|
|
|
const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl, domain, multiColumn, usingPiP } = this.props;
|
|
|
|
const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl, domain, multiColumn, pictureInPicture } = this.props;
|
|
|
|
const { fullscreen } = this.state;
|
|
|
|
const { fullscreen } = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
if (status === null) {
|
|
|
|
if (status === null) {
|
|
|
@ -550,7 +555,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
|
|
|
|