diff --git a/app/com/components/items/posts/PostOverflowAction.tsx b/app/com/components/items/posts/PostOverflowAction.tsx index 58e7855e..29cef9ab 100644 --- a/app/com/components/items/posts/PostOverflowAction.tsx +++ b/app/com/components/items/posts/PostOverflowAction.tsx @@ -8,11 +8,15 @@ import { openModal } from '../../../globals/modals.tsx'; import { MenuItem, MenuItemIcon, MenuRoot } from '../../../primitives/menu.ts'; import { Flyout } from '../../Flyout.tsx'; +import { isProfileTempMuted, useSharedPreferences } from '../../SharedPreferences.tsx'; import DeleteIcon from '../../../icons/baseline-delete.tsx'; import LaunchIcon from '../../../icons/baseline-launch.tsx'; +import ReportIcon from '../../../icons/baseline-report.tsx'; +import VolumeOffIcon from '../../../icons/baseline-volume-off.tsx'; const DeletePostConfirmDialog = lazy(() => import('../../dialogs/DeletePostConfirmDialog.tsx')); +const MuteConfirmDialog = lazy(() => import('../../dialogs/MuteConfirmDialog.tsx')); export interface PostOverflowActionProps { post: SignalizedPost; @@ -20,12 +24,17 @@ export interface PostOverflowActionProps { } const PostOverflowAction = (props: PostOverflowActionProps) => { + const { filters } = useSharedPreferences(); + return (() => { const post = props.post; const author = post.author; const isSameAuthor = post.uid === post.author.did; + const isTempMuted = () => isProfileTempMuted(filters, author.did); + const isMuted = () => author.viewer.muted.value || isTempMuted(); + if (import.meta.env.VITE_MODE === 'desktop') { return ( @@ -53,6 +62,24 @@ const PostOverflowAction = (props: PostOverflowActionProps) => { Delete post )} + + {!isSameAuthor && ( + + )} + + )}