bigbuffet-rw/app/soapbox/components/status.tsx

676 lines
22 KiB
TypeScript
Raw Normal View History

import classNames from 'classnames';
2020-03-27 13:59:38 -07:00
import React from 'react';
import { HotKeys } from 'react-hotkeys';
2020-03-27 13:59:38 -07:00
import ImmutablePureComponent from 'react-immutable-pure-component';
import { injectIntl, FormattedMessage, IntlShape } from 'react-intl';
2022-04-02 09:55:54 -07:00
import { NavLink, withRouter, RouteComponentProps } from 'react-router-dom';
import Icon from 'soapbox/components/icon';
import PlaceholderCard from 'soapbox/features/placeholder/components/placeholder_card';
import QuotedStatus from 'soapbox/features/status/containers/quoted_status_container';
2022-03-21 11:09:01 -07:00
import AccountContainer from '../containers/account_container';
2022-01-10 14:01:24 -08:00
import Card from '../features/status/components/card';
2020-03-27 13:59:38 -07:00
import Bundle from '../features/ui/components/bundle';
2022-01-10 14:01:24 -08:00
import { MediaGallery, Video, Audio } from '../features/ui/util/async-components';
import AttachmentThumbs from './attachment_thumbs';
2022-01-10 14:01:24 -08:00
import StatusActionBar from './status_action_bar';
import StatusContent from './status_content';
2022-01-10 14:01:24 -08:00
import StatusReplyMentions from './status_reply_mentions';
2022-03-21 11:09:01 -07:00
import { HStack, Text } from './ui';
2020-03-27 13:59:38 -07:00
import type { History } from 'history';
import type { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import type {
Account as AccountEntity,
Attachment as AttachmentEntity,
Status as StatusEntity,
} from 'soapbox/types/entities';
// Defined in components/scrollable_list
2022-04-16 11:43:55 -07:00
export type ScrollPosition = { height: number, top: number };
export const textForScreenReader = (intl: IntlShape, status: StatusEntity, rebloggedByText?: string): string => {
const { account } = status;
if (!account || typeof account !== 'object') return '';
const displayName = account.display_name;
2020-03-27 13:59:38 -07:00
const values = [
displayName.length === 0 ? account.acct.split('@')[0] : displayName,
status.spoiler_text && status.hidden ? status.spoiler_text : status.search_index.slice(status.spoiler_text.length),
intl.formatDate(status.created_at, { hour: '2-digit', minute: '2-digit', month: 'short', day: 'numeric' }),
2020-03-27 13:59:38 -07:00
status.getIn(['account', 'acct']),
];
if (rebloggedByText) {
values.push(rebloggedByText);
}
return values.join(', ');
};
export const defaultMediaVisibility = (status: StatusEntity, displayMedia: string): boolean => {
if (!status) return false;
2020-03-27 13:59:38 -07:00
if (status.reblog && typeof status.reblog === 'object') {
status = status.reblog;
2020-03-27 13:59:38 -07:00
}
return (displayMedia !== 'hide_all' && !status.sensitive || displayMedia === 'show_all');
2020-03-27 13:59:38 -07:00
};
2022-04-02 09:55:54 -07:00
interface IStatus extends RouteComponentProps {
intl: IntlShape,
status: StatusEntity,
account: AccountEntity,
otherAccounts: ImmutableList<AccountEntity>,
onClick: () => void,
onReply: (status: StatusEntity, history: History) => void,
onFavourite: (status: StatusEntity) => void,
onReblog: (status: StatusEntity, e?: KeyboardEvent) => void,
onQuote: (status: StatusEntity) => void,
onDelete: (status: StatusEntity) => void,
onDirect: (status: StatusEntity) => void,
onChat: (status: StatusEntity) => void,
onMention: (account: StatusEntity['account'], history: History) => void,
onPin: (status: StatusEntity) => void,
onOpenMedia: (media: ImmutableList<AttachmentEntity>, index: number) => void,
onOpenVideo: (media: ImmutableMap<string, any> | AttachmentEntity, startTime: number) => void,
onOpenAudio: (media: ImmutableMap<string, any>, startTime: number) => void,
onBlock: (status: StatusEntity) => void,
onEmbed: (status: StatusEntity) => void,
onHeightChange: (status: StatusEntity) => void,
onToggleHidden: (status: StatusEntity) => void,
onShowHoverProfileCard: (status: StatusEntity) => void,
muted: boolean,
hidden: boolean,
unread: boolean,
2022-04-04 13:20:17 -07:00
onMoveUp: (statusId: string, featured?: string) => void,
onMoveDown: (statusId: string, featured?: string) => void,
getScrollPosition?: () => ScrollPosition | undefined,
updateScrollBottom?: (bottom: number) => void,
cacheMediaWidth: () => void,
cachedMediaWidth: number,
group: ImmutableMap<string, any>,
displayMedia: string,
allowedEmoji: ImmutableList<string>,
focusable: boolean,
history: History,
featured?: string,
}
interface IStatusState {
showMedia: boolean,
statusId?: string,
emojiSelectorFocused: boolean,
mediaWrapperWidth?: number,
}
class Status extends ImmutablePureComponent<IStatus, IStatusState> {
2021-10-08 15:09:55 -07:00
static defaultProps = {
focusable: true,
2020-03-27 13:59:38 -07:00
};
didShowCard = false;
node?: HTMLDivElement = undefined;
height?: number = undefined;
2020-03-27 13:59:38 -07:00
// Avoid checking props that are functions (and whose equality will always
// evaluate to false. See react-immutable-pure-component for usage.
updateOnProps: any[] = [
2020-03-27 13:59:38 -07:00
'status',
'account',
'muted',
'hidden',
];
state: IStatusState = {
2020-05-28 18:36:39 -07:00
showMedia: defaultMediaVisibility(this.props.status, this.props.displayMedia),
2020-03-27 13:59:38 -07:00
statusId: undefined,
emojiSelectorFocused: false,
2020-03-27 13:59:38 -07:00
};
// Track height changes we know about to compensate scrolling
componentDidMount(): void {
this.didShowCard = Boolean(!this.props.muted && !this.props.hidden && this.props.status && this.props.status.card);
2020-03-27 13:59:38 -07:00
}
getSnapshotBeforeUpdate(): ScrollPosition | undefined {
2020-03-27 13:59:38 -07:00
if (this.props.getScrollPosition) {
return this.props.getScrollPosition();
} else {
return undefined;
2020-03-27 13:59:38 -07:00
}
}
static getDerivedStateFromProps(nextProps: IStatus, prevState: IStatusState) {
if (nextProps.status && nextProps.status.id !== prevState.statusId) {
2020-03-27 13:59:38 -07:00
return {
showMedia: defaultMediaVisibility(nextProps.status, nextProps.displayMedia),
statusId: nextProps.status.id,
2020-03-27 13:59:38 -07:00
};
} else {
return null;
}
}
// Compensate height changes
componentDidUpdate(_prevProps: IStatus, _prevState: IStatusState, snapshot?: ScrollPosition): void {
const doShowCard: boolean = Boolean(!this.props.muted && !this.props.hidden && this.props.status && this.props.status.card);
2020-03-27 13:59:38 -07:00
if (doShowCard && !this.didShowCard) {
this.didShowCard = true;
if (snapshot && this.props.updateScrollBottom) {
2020-03-27 13:59:38 -07:00
if (this.node && this.node.offsetTop < snapshot.top) {
this.props.updateScrollBottom(snapshot.height - snapshot.top);
}
}
}
}
componentWillUnmount(): void {
// FIXME: Run this code only when a status is being deleted.
//
// const { getScrollPosition, updateScrollBottom } = this.props;
//
// if (this.node && getScrollPosition && updateScrollBottom) {
// const position = getScrollPosition();
// if (position && this.node.offsetTop < position.top) {
// requestAnimationFrame(() => {
// updateScrollBottom(position.height - position.top);
// });
// }
// }
2020-03-27 13:59:38 -07:00
}
handleToggleMediaVisibility = (): void => {
2020-03-27 13:59:38 -07:00
this.setState({ showMedia: !this.state.showMedia });
}
handleClick = (): void => {
2020-03-27 13:59:38 -07:00
if (this.props.onClick) {
this.props.onClick();
return;
}
2022-03-17 18:17:28 -07:00
if (!this.props.history) {
2020-03-27 13:59:38 -07:00
return;
}
this.props.history.push(`/@${this._properStatus().getIn(['account', 'acct'])}/posts/${this._properStatus().id}`);
2020-03-27 13:59:38 -07:00
}
handleExpandClick: React.EventHandler<React.MouseEvent> = (e) => {
2020-03-27 13:59:38 -07:00
if (e.button === 0) {
2022-03-17 18:17:28 -07:00
if (!this.props.history) {
2020-03-27 13:59:38 -07:00
return;
}
this.props.history.push(`/@${this._properStatus().getIn(['account', 'acct'])}/posts/${this._properStatus().id}`);
2020-03-27 13:59:38 -07:00
}
}
handleExpandedToggle = (): void => {
2020-03-27 13:59:38 -07:00
this.props.onToggleHidden(this._properStatus());
};
renderLoadingMediaGallery(): JSX.Element {
return <div className='media_gallery' style={{ height: '285px' }} />;
2020-03-27 13:59:38 -07:00
}
renderLoadingVideoPlayer(): JSX.Element {
return <div className='media-spoiler-video' style={{ height: '285px' }} />;
2020-03-27 13:59:38 -07:00
}
renderLoadingAudioPlayer(): JSX.Element {
return <div className='media-spoiler-audio' style={{ height: '285px' }} />;
2020-06-24 19:53:25 -07:00
}
handleOpenVideo = (media: ImmutableMap<string, any>, startTime: number): void => {
2020-03-27 13:59:38 -07:00
this.props.onOpenVideo(media, startTime);
}
handleOpenAudio = (media: ImmutableMap<string, any>, startTime: number): void => {
this.props.onOpenAudio(media, startTime);
2020-06-24 19:53:25 -07:00
}
handleHotkeyOpenMedia = (e?: KeyboardEvent): void => {
2021-08-28 05:17:14 -07:00
const { onOpenMedia, onOpenVideo } = this.props;
const status = this._properStatus();
const firstAttachment = status.media_attachments.first();
2021-08-28 05:17:14 -07:00
e?.preventDefault();
2021-08-28 05:17:14 -07:00
if (firstAttachment) {
if (firstAttachment.type === 'video') {
onOpenVideo(firstAttachment, 0);
2021-08-28 05:17:14 -07:00
} else {
onOpenMedia(status.media_attachments, 0);
2021-08-28 05:17:14 -07:00
}
}
}
handleHotkeyReply = (e?: KeyboardEvent): void => {
e?.preventDefault();
2022-03-17 18:17:28 -07:00
this.props.onReply(this._properStatus(), this.props.history);
2020-03-27 13:59:38 -07:00
}
handleHotkeyFavourite = (): void => {
2020-03-27 13:59:38 -07:00
this.props.onFavourite(this._properStatus());
}
handleHotkeyBoost = (e?: KeyboardEvent): void => {
2020-03-27 13:59:38 -07:00
this.props.onReblog(this._properStatus(), e);
}
handleHotkeyMention = (e?: KeyboardEvent): void => {
e?.preventDefault();
this.props.onMention(this._properStatus().account, this.props.history);
2020-03-27 13:59:38 -07:00
}
handleHotkeyOpen = (): void => {
this.props.history.push(`/@${this._properStatus().getIn(['account', 'acct'])}/posts/${this._properStatus().id}`);
2020-03-27 13:59:38 -07:00
}
handleHotkeyOpenProfile = (): void => {
2022-03-17 18:17:28 -07:00
this.props.history.push(`/@${this._properStatus().getIn(['account', 'acct'])}`);
2020-03-27 13:59:38 -07:00
}
handleHotkeyMoveUp = (e?: KeyboardEvent): void => {
// FIXME: what's going on here?
// this.props.onMoveUp(this.props.status.id, e?.target?.getAttribute('data-featured'));
2020-03-27 13:59:38 -07:00
}
handleHotkeyMoveDown = (e?: KeyboardEvent): void => {
// FIXME: what's going on here?
// this.props.onMoveDown(this.props.status.id, e?.target?.getAttribute('data-featured'));
2020-03-27 13:59:38 -07:00
}
handleHotkeyToggleHidden = (): void => {
2020-03-27 13:59:38 -07:00
this.props.onToggleHidden(this._properStatus());
}
handleHotkeyToggleSensitive = (): void => {
2020-03-27 13:59:38 -07:00
this.handleToggleMediaVisibility();
}
handleHotkeyReact = (): void => {
this._expandEmojiSelector();
}
handleEmojiSelectorExpand: React.EventHandler<React.KeyboardEvent> = e => {
if (e.key === 'Enter') {
this._expandEmojiSelector();
}
e.preventDefault();
}
handleEmojiSelectorUnfocus = (): void => {
this.setState({ emojiSelectorFocused: false });
}
_expandEmojiSelector = (): void => {
this.setState({ emojiSelectorFocused: true });
const firstEmoji: HTMLDivElement | null | undefined = this.node?.querySelector('.emoji-react-selector .emoji-react-selector__emoji');
firstEmoji?.focus();
};
_properStatus(): StatusEntity {
2020-03-27 13:59:38 -07:00
const { status } = this.props;
if (status.reblog && typeof status.reblog === 'object') {
return status.reblog;
2020-03-27 13:59:38 -07:00
} else {
return status;
}
}
handleRef = (c: HTMLDivElement): void => {
2020-03-27 13:59:38 -07:00
this.node = c;
}
setRef = (c: HTMLDivElement): void => {
2022-03-21 11:09:01 -07:00
if (c) {
this.setState({ mediaWrapperWidth: c.offsetWidth });
}
}
render() {
2020-03-27 13:59:38 -07:00
let media = null;
const poll = null;
let prepend, rebloggedByText, reblogElement, reblogElementMobile;
2020-03-27 13:59:38 -07:00
2022-03-21 11:09:01 -07:00
const { intl, hidden, featured, unread, group } = this.props;
2020-03-27 13:59:38 -07:00
// FIXME: why does this need to reassign status and account??
let { status, account, ...other } = this.props; // eslint-disable-line prefer-const
if (!status) return null;
2020-03-27 13:59:38 -07:00
if (hidden) {
return (
<div ref={this.handleRef}>
{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}
{status.content}
2020-03-27 13:59:38 -07:00
</div>
);
}
if (status.filtered || status.getIn(['reblog', 'filtered'])) {
const minHandlers = this.props.muted ? undefined : {
2020-03-27 13:59:38 -07:00
moveUp: this.handleHotkeyMoveUp,
moveDown: this.handleHotkeyMoveDown,
};
return (
<HotKeys handlers={minHandlers}>
<div className={classNames('status__wrapper', 'status__wrapper--filtered', { focusable: this.props.focusable })} tabIndex={this.props.focusable ? 0 : undefined} ref={this.handleRef}>
2020-03-27 13:59:38 -07:00
<FormattedMessage id='status.filtered' defaultMessage='Filtered' />
</div>
</HotKeys>
);
}
if (featured) {
prepend = (
2022-03-21 11:09:01 -07:00
<div className='pt-4 px-4'>
<HStack alignItems='center' space={1}>
<Icon src={require('@tabler/icons/icons/pinned.svg')} className='text-gray-600 dark:text-gray-400' />
2022-03-21 11:09:01 -07:00
<Text size='sm' theme='muted' weight='medium'>
<FormattedMessage id='status.pinned' defaultMessage='Pinned post' />
</Text>
</HStack>
2020-03-27 13:59:38 -07:00
</div>
);
2022-03-21 11:09:01 -07:00
}
2020-03-27 13:59:38 -07:00
if (status.reblog && typeof status.reblog === 'object') {
const displayNameHtml = { __html: String(status.getIn(['account', 'display_name_html'])) };
2022-03-21 11:09:01 -07:00
reblogElement = (
<NavLink
to={`/@${status.getIn(['account', 'acct'])}`}
onClick={(event) => event.stopPropagation()}
className='hidden sm:flex items-center text-gray-500 text-xs font-medium space-x-1 hover:underline'
>
<Icon src={require('@tabler/icons/icons/repeat.svg')} className='text-green-600' />
<HStack alignItems='center'>
<FormattedMessage
id='status.reblogged_by'
defaultMessage='{name} reposted'
values={{
name: <bdi className='max-w-[100px] truncate pr-1'>
<strong className='text-gray-800 dark:text-gray-200' dangerouslySetInnerHTML={displayNameHtml} />
2022-03-21 11:09:01 -07:00
</bdi>,
}}
/>
</HStack>
</NavLink>
);
reblogElementMobile = (
<div className='pt-4 px-4 sm:hidden truncate'>
<NavLink
to={`/@${status.getIn(['account', 'acct'])}`}
onClick={(event) => event.stopPropagation()}
className='flex items-center text-gray-500 text-xs font-medium space-x-1 hover:underline'
>
<Icon src={require('@tabler/icons/icons/repeat.svg')} className='text-green-600' />
<span>
<FormattedMessage
id='status.reblogged_by'
defaultMessage='{name} reposted'
values={{
name: <bdi>
<strong className='text-gray-800 dark:text-gray-200' dangerouslySetInnerHTML={displayNameHtml} />
2022-03-21 11:09:01 -07:00
</bdi>,
}}
/>
</span>
</NavLink>
2020-03-27 13:59:38 -07:00
</div>
);
2022-03-21 11:09:01 -07:00
rebloggedByText = intl.formatMessage({
id: 'status.reblogged_by',
defaultMessage: '{name} reposted',
}, {
name: String(status.getIn(['account', 'acct'])),
2022-03-21 11:09:01 -07:00
});
2020-03-27 13:59:38 -07:00
// @ts-ignore what the FUCK
account = status.account;
status = status.reblog;
2020-03-27 13:59:38 -07:00
}
const size = status.media_attachments.size;
const firstAttachment = status.media_attachments.first();
if (size > 0 && firstAttachment) {
2020-03-27 13:59:38 -07:00
if (this.props.muted) {
media = (
<AttachmentThumbs
media={status.media_attachments}
onClick={this.handleClick}
sensitive={status.sensitive}
/>
2020-03-27 13:59:38 -07:00
);
} else if (size === 1 && firstAttachment.type === 'video') {
const video = firstAttachment;
2020-03-27 13:59:38 -07:00
if (video.external_video_id && status.card) {
2022-03-21 11:09:01 -07:00
const { mediaWrapperWidth } = this.state;
const getHeight = (): number => {
const width = Number(video.meta.getIn(['original', 'width']));
const height = Number(video.meta.getIn(['original', 'height']));
return Number(mediaWrapperWidth) / (width / height);
};
const height = getHeight();
2022-03-21 11:09:01 -07:00
media = (
<div className='status-card horizontal compact interactive status-card--video'>
<div
ref={this.setRef}
className='status-card__image status-card-video'
style={height ? { height } : undefined}
dangerouslySetInnerHTML={{ __html: status.card.html }}
/>
2022-03-21 11:09:01 -07:00
</div>
);
} else {
media = (
<Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} >
{(Component: any) => (
2022-03-21 11:09:01 -07:00
<Component
preview={video.preview_url}
blurhash={video.blurhash}
src={video.url}
alt={video.description}
aspectRatio={video.meta.getIn(['original', 'aspect'])}
2022-03-21 11:09:01 -07:00
width={this.props.cachedMediaWidth}
height={285}
inline
sensitive={status.sensitive}
2022-03-21 11:09:01 -07:00
onOpenVideo={this.handleOpenVideo}
cacheWidth={this.props.cacheMediaWidth}
visible={this.state.showMedia}
onToggleVisibility={this.handleToggleMediaVisibility}
/>
)}
</Bundle>
);
}
} else if (size === 1 && firstAttachment.type === 'audio') {
const attachment = firstAttachment;
2020-06-24 19:53:25 -07:00
media = (
<Bundle fetchComponent={Audio} loading={this.renderLoadingAudioPlayer} >
{(Component: any) => (
2020-06-24 19:53:25 -07:00
<Component
src={attachment.url}
alt={attachment.description}
poster={attachment.preview_url !== attachment.url ? attachment.preview_url : status.getIn(['account', 'avatar_static'])}
backgroundColor={attachment.meta.getIn(['colors', 'background'])}
foregroundColor={attachment.meta.getIn(['colors', 'foreground'])}
accentColor={attachment.meta.getIn(['colors', 'accent'])}
duration={attachment.meta.getIn(['original', 'duration'], 0)}
width={this.props.cachedMediaWidth}
height={263}
2020-06-24 19:53:25 -07:00
cacheWidth={this.props.cacheMediaWidth}
/>
)}
</Bundle>
);
2020-03-27 13:59:38 -07:00
} else {
media = (
<Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery}>
{(Component: any) => (
2020-03-27 13:59:38 -07:00
<Component
media={status.media_attachments}
sensitive={status.sensitive}
height={285}
2020-03-27 13:59:38 -07:00
onOpenMedia={this.props.onOpenMedia}
cacheWidth={this.props.cacheMediaWidth}
defaultWidth={this.props.cachedMediaWidth}
visible={this.state.showMedia}
onToggleVisibility={this.handleToggleMediaVisibility}
/>
)}
</Bundle>
);
}
} else if (status.spoiler_text.length === 0 && !status.quote && status.card) {
2020-03-27 13:59:38 -07:00
media = (
<Card
onOpenMedia={this.props.onOpenMedia}
card={status.card}
2020-03-27 13:59:38 -07:00
compact
cacheWidth={this.props.cacheMediaWidth}
defaultWidth={this.props.cachedMediaWidth}
/>
);
} else if (status.expectsCard) {
media = (
<PlaceholderCard />
);
2020-03-27 13:59:38 -07:00
}
let quote;
if (status.quote) {
if (status.pleroma.get('quote_visible', true) === false) {
quote = (
<div className='quoted-status-tombstone'>
<p><FormattedMessage id='statuses.quote_tombstone' defaultMessage='Post is unavailable.' /></p>
</div>
);
} else {
quote = <QuotedStatus statusId={status.quote} />;
}
}
const handlers = this.props.muted ? undefined : {
2020-03-27 13:59:38 -07:00
reply: this.handleHotkeyReply,
favourite: this.handleHotkeyFavourite,
boost: this.handleHotkeyBoost,
mention: this.handleHotkeyMention,
open: this.handleHotkeyOpen,
openProfile: this.handleHotkeyOpenProfile,
moveUp: this.handleHotkeyMoveUp,
moveDown: this.handleHotkeyMoveDown,
toggleHidden: this.handleHotkeyToggleHidden,
toggleSensitive: this.handleHotkeyToggleSensitive,
2021-08-28 05:17:14 -07:00
openMedia: this.handleHotkeyOpenMedia,
react: this.handleHotkeyReact,
2020-03-27 13:59:38 -07:00
};
const statusUrl = `/@${status.getIn(['account', 'acct'])}/posts/${status.id}`;
2022-03-21 11:09:01 -07:00
// const favicon = status.getIn(['account', 'pleroma', 'favicon']);
// const domain = getDomain(status.account);
2020-03-27 13:59:38 -07:00
return (
2022-04-16 17:03:33 -07:00
<HotKeys handlers={handlers} data-testid='status'>
2022-03-21 11:09:01 -07:00
<div
className='status cursor-pointer'
tabIndex={this.props.focusable && !this.props.muted ? 0 : undefined}
2022-03-21 11:09:01 -07:00
data-featured={featured ? 'true' : null}
aria-label={textForScreenReader(intl, status, rebloggedByText)}
ref={this.handleRef}
onClick={() => this.props.history.push(statusUrl)}
2022-03-21 11:09:01 -07:00
role='link'
>
2020-03-27 13:59:38 -07:00
{prepend}
2022-03-21 11:09:01 -07:00
{reblogElementMobile}
<div
className={classNames({
'status__wrapper': true,
[`status-${status.visibility}`]: true,
'status-reply': !!status.in_reply_to_id,
2022-03-21 11:09:01 -07:00
muted: this.props.muted,
read: unread === false,
})}
data-id={status.id}
2022-03-21 11:09:01 -07:00
>
<div className='mb-4'>
<HStack justifyContent='between' alignItems='start'>
<AccountContainer
key={String(status.getIn(['account', 'id']))}
id={String(status.getIn(['account', 'id']))}
timestamp={status.created_at}
2022-03-21 11:09:01 -07:00
timestampUrl={statusUrl}
action={reblogElement}
hideActions={!reblogElement}
/>
</HStack>
2020-03-27 13:59:38 -07:00
</div>
2022-03-21 11:09:01 -07:00
<div className='status__content-wrapper'>
{!group && status.group && (
2022-03-21 11:09:01 -07:00
<div className='status__meta'>
Posted in <NavLink to={`/groups/${status.getIn(['group', 'id'])}`}>{String(status.getIn(['group', 'title']))}</NavLink>
2022-03-21 11:09:01 -07:00
</div>
)}
2020-03-27 13:59:38 -07:00
2022-03-21 11:09:01 -07:00
<StatusReplyMentions status={this._properStatus()} />
2022-01-04 12:06:08 -08:00
2022-03-21 11:09:01 -07:00
<StatusContent
status={status}
onClick={this.handleClick}
expanded={!status.hidden}
2022-03-21 11:09:01 -07:00
onExpandedToggle={this.handleExpandedToggle}
collapsable
/>
2020-03-27 13:59:38 -07:00
2022-03-21 11:09:01 -07:00
{media}
{poll}
{quote}
2020-03-27 13:59:38 -07:00
2022-03-21 11:09:01 -07:00
<StatusActionBar
status={status}
2022-04-04 13:20:17 -07:00
// @ts-ignore what?
2022-03-21 11:09:01 -07:00
account={account}
emojiSelectorFocused={this.state.emojiSelectorFocused}
handleEmojiSelectorUnfocus={this.handleEmojiSelectorUnfocus}
{...other}
/>
</div>
2020-03-27 13:59:38 -07:00
</div>
</div>
</HotKeys>
);
}
}
export default withRouter(injectIntl(Status));