Skip to content

Commit

Permalink
Update PostWithBody to show deleted body similar to PostRow
Browse files Browse the repository at this point in the history
- Similar to 454cb1a
  • Loading branch information
High5Apps committed Aug 26, 2024
1 parent 454cb1a commit bff05c9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/components/controls/PostWithBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const useStyles = () => {
paddingHorizontal: spacing.m,
paddingBottom: spacing.m,
},
bodyDeleted: {
color: colors.labelSecondary,
},
});

return { styles };
Expand All @@ -35,14 +38,18 @@ export default function PostWithBody({ onLayout, onPostChanged, post }: Props) {

if (!post) { return null; }

const { body } = post;
const body = post.deletedAt ? '[left Org]' : post.body;

return (
<View onLayout={onLayout}>
<PostRow item={post} onPostChanged={onPostChanged} />
{body && (
<HyperlinkDetector>
<Text style={styles.body}>{body}</Text>
<Text
style={[styles.body, post.deletedAt && styles.bodyDeleted]}
>
{body}
</Text>
</HyperlinkDetector>
)}
</View>
Expand Down

0 comments on commit bff05c9

Please sign in to comment.