diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-04-28 20:03:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-28 20:03:13 -0500 |
commit | a95c03e280ca153ba4a98d6b81ff9d743d4adcaa (patch) | |
tree | d3a63bcc87d24ad4c8e6e3893be0b54aca12b553 /src/view/screens/Profile.tsx | |
parent | e68aa75429c2a0a495105f641361ee8fe22370f1 (diff) | |
download | voidsky-a95c03e280ca153ba4a98d6b81ff9d743d4adcaa.tar.zst |
Implement blocks (#554)
* Quick fix to prompt * Add blocked accounts screen * Add blocking tools to profile * Blur avis/banners of blocked users * Factor blocking state into moderation dsl * Filter post slices from the feed if any are hidden * Handle various block UIs * Filter in the client on blockedBy * Implement block list * Fix some copy * Bump deps * Fix lint
Diffstat (limited to 'src/view/screens/Profile.tsx')
-rw-r--r-- | src/view/screens/Profile.tsx | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index 4be117932..5fb212554 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -116,6 +116,24 @@ export const ProfileScreen = withAuthRequired( } else if (item === ProfileUiModel.LOADING_ITEM) { return <PostFeedLoadingPlaceholder /> } else if (item._reactKey === '__error__') { + if (uiState.feed.isBlocking) { + return ( + <EmptyState + icon="ban" + message="Posts hidden" + style={styles.emptyState} + /> + ) + } + if (uiState.feed.isBlockedBy) { + return ( + <EmptyState + icon="ban" + message="Posts hidden" + style={styles.emptyState} + /> + ) + } return ( <View style={s.p5}> <ErrorMessage @@ -137,7 +155,12 @@ export const ProfileScreen = withAuthRequired( } return <View /> }, - [onPressTryAgain, uiState.profile.did], + [ + onPressTryAgain, + uiState.profile.did, + uiState.feed.isBlocking, + uiState.feed.isBlockedBy, + ], ) return ( |