From 0c9dc2163ab5102e58f13597ba84e14717e09ffd Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 27 Dec 2023 08:48:23 -0800 Subject: Fix: only show appeal CW item on moderated posts (#2312) * Fix: only show appeal CW item on moderated posts * Add appeal cw control to feed view o fposts --- src/view/com/post-thread/PostThreadItem.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 6a377cdf6..13f40bb16 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -186,9 +186,9 @@ let PostThreadItemLoaded = ({ return makeProfileLink(post.author, 'post', urip.rkey, 'reposted-by') }, [post.uri, post.author]) const repostsTitle = 'Reposts of this post' - const isSelfLabeledPost = + const isModeratedPost = moderation.decisions.post.cause?.type === 'label' && - moderation.decisions.post.cause.label.src === currentAccount?.did + moderation.decisions.post.cause.label.src !== currentAccount?.did const translatorUrl = getTranslatorLink( record?.text || '', @@ -335,7 +335,7 @@ let PostThreadItemLoaded = ({ postUri={post.uri} record={record} showAppealLabelItem={ - post.author.did === currentAccount?.did && !isSelfLabeledPost + post.author.did === currentAccount?.did && isModeratedPost } style={{ paddingVertical: 6, -- cgit 1.4.1 From b5d53ef0b9ec5e109710b6b21419913a3683b743 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 27 Dec 2023 08:53:39 -0800 Subject: Fix missing avatar moderation in replies (#2325) --- src/view/com/post-thread/PostThreadItem.tsx | 1 + src/view/com/util/PostMeta.tsx | 4 +++- 2 files changed, 4 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 13f40bb16..986fd70b2 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -539,6 +539,7 @@ let PostThreadItemLoaded = ({ timestamp={post.indexedAt} postHref={postHref} showAvatar={isThreadedChild} + avatarModeration={moderation.avatar} avatarSize={28} displayNameType="md-bold" displayNameStyle={isThreadedChild && s.ml2} diff --git a/src/view/com/util/PostMeta.tsx b/src/view/com/util/PostMeta.tsx index eef7094cd..b9c3842b3 100644 --- a/src/view/com/util/PostMeta.tsx +++ b/src/view/com/util/PostMeta.tsx @@ -11,6 +11,7 @@ import {sanitizeHandle} from 'lib/strings/handles' import {isAndroid} from 'platform/detection' import {TimeElapsed} from './TimeElapsed' import {makeProfileLink} from 'lib/routes/links' +import {ModerationUI} from '@atproto/api' interface PostMetaOpts { author: { @@ -23,6 +24,7 @@ interface PostMetaOpts { postHref: string timestamp: string showAvatar?: boolean + avatarModeration?: ModerationUI avatarSize?: number displayNameType?: TypographyVariant displayNameStyle?: StyleProp @@ -41,7 +43,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => { )} -- cgit 1.4.1