[Glitch] Cancel quote button appearing in all statuses

Port d2dca826dd to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo authored and Claire committed 2026-02-05 18:00:37 +01:00
1 parent 55cd5e1ab1
commit 09206c7369
4 files changed
+53 -9

No files matched your search

@@ -12,6 +12,8 @@ import type { DisplayNameProps } from '../display_name';
import { LinkedDisplayName } from '../display_name';
import { VisibilityIcon } from '../visibility_icon';
import type { StatusProps } from './types';
export interface StatusHeaderProps {
status: Status;
account?: Account;
@@ -22,7 +24,10 @@ export interface StatusHeaderProps {
onHeaderClick?: MouseEventHandler<HTMLDivElement>;
}
export type StatusHeaderRenderFn = (args: StatusHeaderProps) => ReactNode;
export type StatusHeaderRenderFn = (
args: StatusHeaderProps,
statusProps?: StatusProps,
) => ReactNode;
export const StatusHeader: FC<StatusHeaderProps> = ({
status,
@@ -0,0 +1,36 @@
import type { ComponentClass, MouseEventHandler, ReactNode } from 'react';
import type { Account } from '@/flavours/glitch/models/account';
import type { StatusHeaderRenderFn } from './header';
// Taken from the Status component.
export interface StatusProps {
account?: Account;
children?: ReactNode;
previousId?: string;
rootId?: string;
onClick?: MouseEventHandler<HTMLDivElement>;
muted?: boolean;
hidden?: boolean;
unread?: boolean;
showThread?: boolean;
showActions?: boolean;
isQuotedPost?: boolean;
shouldHighlightOnMount?: boolean;
getScrollPosition?: () => null | { height: number; top: number };
updateScrollBottom?: (snapshot: number) => void;
cacheMediaWidth?: (width: number) => void;
cachedMediaWidth?: number;
scrollKey?: string;
skipPrepend?: boolean;
avatarSize?: number;
unfocusable?: boolean;
headerRenderFn?: StatusHeaderRenderFn;
contextType?: string;
}
export type StatusComponent = ComponentClass<
StatusProps,
{ showMedia?: boolean; showDespiteFilter?: boolean }
>;