From 419ac2d0df013db08bec0eb9cef8e6fd5a0bcd33 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Fri, 1 Sep 2023 12:30:02 -0700 Subject: Improved mute alerting (#1355) * Use a simpler mute alert when viewing a post by a muted user * Dont mute self-QPs when we're overriding a mute * Fix types --- src/view/com/post-thread/PostThreadItem.tsx | 34 ++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'src/view/com/post-thread/PostThreadItem.tsx') diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 8b556cea3..5b5fee0ca 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -19,6 +19,7 @@ import {niceDate} from 'lib/strings/time' import {sanitizeDisplayName} from 'lib/strings/display-names' import {sanitizeHandle} from 'lib/strings/handles' import {pluralize} from 'lib/strings/helpers' +import {isEmbedByEmbedder} from 'lib/embeds' import {getTranslatorLink, isPostInLanguage} from '../../../locale/helpers' import {useStores} from 'state/index' import {PostMeta} from '../util/PostMeta' @@ -59,6 +60,7 @@ export const PostThreadItem = observer(function PostThreadItem({ const itemTitle = `Post by ${item.post.author.handle}` const authorHref = makeProfileLink(item.post.author) const authorTitle = item.post.author.handle + const isAuthorMuted = item.post.author.viewer?.muted const likesHref = React.useMemo(() => { const urip = new AtUri(item.post.uri) return makeProfileLink(item.post.author, 'post', urip.rkey, 'liked-by') @@ -224,6 +226,30 @@ export const PostThreadItem = observer(function PostThreadItem({ + {isAuthorMuted && ( + + + + Muted + + + )} ) : undefined} {item.post.embed && ( - +