about summary refs log tree commit diff
path: root/src/view/com/posts/FeedSlice.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-04-28 20:03:13 -0500
committerGitHub <noreply@github.com>2023-04-28 20:03:13 -0500
commita95c03e280ca153ba4a98d6b81ff9d743d4adcaa (patch)
treed3a63bcc87d24ad4c8e6e3893be0b54aca12b553 /src/view/com/posts/FeedSlice.tsx
parente68aa75429c2a0a495105f641361ee8fe22370f1 (diff)
downloadvoidsky-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/com/posts/FeedSlice.tsx')
-rw-r--r--src/view/com/posts/FeedSlice.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/view/com/posts/FeedSlice.tsx b/src/view/com/posts/FeedSlice.tsx
index 651b69bff..5a191ac10 100644
--- a/src/view/com/posts/FeedSlice.tsx
+++ b/src/view/com/posts/FeedSlice.tsx
@@ -7,6 +7,7 @@ import {Text} from '../util/text/Text'
 import Svg, {Circle, Line} from 'react-native-svg'
 import {FeedItem} from './FeedItem'
 import {usePalette} from 'lib/hooks/usePalette'
+import {ModerationBehaviorCode} from 'lib/labeling/types'
 
 export function FeedSlice({
   slice,
@@ -17,6 +18,9 @@ export function FeedSlice({
   showFollowBtn?: boolean
   ignoreMuteFor?: string
 }) {
+  if (slice.moderation.list.behavior === ModerationBehaviorCode.Hide) {
+    return null
+  }
   if (slice.isThread && slice.items.length > 3) {
     const last = slice.items.length - 1
     return (