about summary refs log tree commit diff
path: root/src/state/cache
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-06-12 23:16:52 +0300
committerGitHub <noreply@github.com>2025-06-12 13:16:52 -0700
commit18b4fcf8eb1ec4d27c1245726a4dbf50c534f651 (patch)
treeaef07b6233b32b758d19c588c98817a82f8c6428 /src/state/cache
parent8a5a7db1466f20af90809a6fe7c07bb0e1e000ac (diff)
downloadvoidsky-18b4fcf8eb1ec4d27c1245726a4dbf50c534f651.tar.zst
Revert "Instant Feed Update on Mute or Moderation Action" (#8482)
Diffstat (limited to 'src/state/cache')
-rw-r--r--src/state/cache/post-shadow.ts12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/state/cache/post-shadow.ts b/src/state/cache/post-shadow.ts
index 90fddda2b..d7f1eb8b9 100644
--- a/src/state/cache/post-shadow.ts
+++ b/src/state/cache/post-shadow.ts
@@ -15,7 +15,6 @@ import {findAllPostsInQueryData as findAllPostsInQuoteQueryData} from '#/state/q
 import {findAllPostsInQueryData as findAllPostsInThreadQueryData} from '#/state/queries/post-thread'
 import {findAllPostsInQueryData as findAllPostsInSearchQueryData} from '#/state/queries/search-posts'
 import {findAllPostsInQueryData as findAllPostsInThreadV2QueryData} from '#/state/queries/usePostThread/queryCache'
-import {useProfileShadow} from './profile-shadow'
 import {castAsShadow, type Shadow} from './types'
 export type {Shadow} from './types'
 
@@ -45,10 +44,6 @@ export function usePostShadow(
     setShadow(shadows.get(post))
   }
 
-  const authorShadow = useProfileShadow(post.author)
-  const wasMuted = !!authorShadow.viewer?.muted
-  const wasBlocked = !!authorShadow.viewer?.blocking
-
   useEffect(() => {
     function onUpdate() {
       setShadow(shadows.get(post))
@@ -60,18 +55,15 @@ export function usePostShadow(
   }, [post, setShadow])
 
   return useMemo(() => {
-    if (wasMuted || wasBlocked) {
-      return POST_TOMBSTONE
-    }
     if (shadow) {
       return mergeShadow(post, shadow)
     } else {
       return castAsShadow(post)
     }
-  }, [post, shadow, wasMuted, wasBlocked])
+  }, [post, shadow])
 }
 
-export function mergeShadow(
+function mergeShadow(
   post: AppBskyFeedDefs.PostView,
   shadow: Partial<PostShadow>,
 ): Shadow<AppBskyFeedDefs.PostView> | typeof POST_TOMBSTONE {