Implement account muting

This commit is contained in:
Paul Frazee 2023-01-02 13:40:14 -06:00
parent 3972706c54
commit 8cd2b4a721
12 changed files with 101 additions and 15 deletions

View file

@ -282,7 +282,12 @@ export const PostThreadItem = observer(function PostThreadItem({
onCopyPostText={onCopyPostText}
onDeletePost={onDeletePost}
/>
{record.text ? (
{item.post.author.viewer?.muted ? (
<View style={[styles.mutedWarning, pal.btn]}>
<FontAwesomeIcon icon={['far', 'eye-slash']} style={s.mr2} />
<Text type="body2">This post is by a muted account.</Text>
</View>
) : record.text ? (
<View style={styles.postTextContainer}>
<RichText
text={record.text}
@ -367,6 +372,14 @@ const styles = StyleSheet.create({
paddingRight: 5,
maxWidth: 240,
},
mutedWarning: {
flexDirection: 'row',
alignItems: 'center',
padding: 10,
marginTop: 2,
marginBottom: 6,
borderRadius: 2,
},
postTextContainer: {
flexDirection: 'row',
alignItems: 'center',