|
|
|
@ -102,7 +102,6 @@ interface IStatus extends RouteComponentProps {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface IStatusState {
|
|
|
|
|
isDragging: boolean,
|
|
|
|
|
showMedia: boolean,
|
|
|
|
|
statusId?: string,
|
|
|
|
|
emojiSelectorFocused: boolean,
|
|
|
|
@ -129,7 +128,6 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
state: IStatusState = {
|
|
|
|
|
isDragging: false,
|
|
|
|
|
showMedia: defaultMediaVisibility(this.props.status, this.props.displayMedia),
|
|
|
|
|
statusId: undefined,
|
|
|
|
|
emojiSelectorFocused: false,
|
|
|
|
@ -193,9 +191,7 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
|
|
|
|
|
this.setState({ showMedia: !this.state.showMedia });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleClick = (event: any): void => {
|
|
|
|
|
event.stopPropagation();
|
|
|
|
|
|
|
|
|
|
handleClick = (): void => {
|
|
|
|
|
if (this.props.onClick) {
|
|
|
|
|
this.props.onClick();
|
|
|
|
|
return;
|
|
|
|
@ -609,13 +605,7 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
|
|
|
|
|
data-featured={featured ? 'true' : null}
|
|
|
|
|
aria-label={textForScreenReader(intl, status, rebloggedByText)}
|
|
|
|
|
ref={this.handleRef}
|
|
|
|
|
onMouseUp={() => {
|
|
|
|
|
if (!this.state.isDragging) {
|
|
|
|
|
this.props.history.push(statusUrl);
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
onMouseDown={() => this.setState({ isDragging: false })}
|
|
|
|
|
onMouseMove={() => this.setState({ isDragging: true })}
|
|
|
|
|
onClick={() => this.props.history.push(statusUrl)}
|
|
|
|
|
role='link'
|
|
|
|
|
>
|
|
|
|
|
{prepend}
|
|
|
|
|