about summary refs log tree commit diff
path: root/src/state
diff options
context:
space:
mode:
Diffstat (limited to 'src/state')
-rw-r--r--src/state/preferences/feed-tuners.tsx31
-rw-r--r--src/state/queries/post-feed.ts2
2 files changed, 30 insertions, 3 deletions
diff --git a/src/state/preferences/feed-tuners.tsx b/src/state/preferences/feed-tuners.tsx
index ac129d172..ca0fefe91 100644
--- a/src/state/preferences/feed-tuners.tsx
+++ b/src/state/preferences/feed-tuners.tsx
@@ -19,7 +19,34 @@ export function useFeedTuners(feedDesc: FeedDescriptor) {
       ]
     }
     if (feedDesc.startsWith('list')) {
-      return [FeedTuner.dedupReposts]
+      const feedTuners = []
+
+      if (feedDesc.endsWith('|as_following')) {
+        // Same as Following tuners below, copypaste for now.
+        if (preferences?.feedViewPrefs.hideReposts) {
+          feedTuners.push(FeedTuner.removeReposts)
+        } else {
+          feedTuners.push(FeedTuner.dedupReposts)
+        }
+        if (preferences?.feedViewPrefs.hideReplies) {
+          feedTuners.push(FeedTuner.removeReplies)
+        } else {
+          feedTuners.push(
+            FeedTuner.thresholdRepliesOnly({
+              userDid: currentAccount?.did || '',
+              minLikes: preferences?.feedViewPrefs.hideRepliesByLikeCount || 0,
+              followedOnly:
+                !!preferences?.feedViewPrefs.hideRepliesByUnfollowed,
+            }),
+          )
+        }
+        if (preferences?.feedViewPrefs.hideQuotePosts) {
+          feedTuners.push(FeedTuner.removeQuotePosts)
+        }
+      } else {
+        feedTuners.push(FeedTuner.dedupReposts)
+      }
+      return feedTuners
     }
     if (feedDesc === 'following') {
       const feedTuners = []
@@ -29,7 +56,6 @@ export function useFeedTuners(feedDesc: FeedDescriptor) {
       } else {
         feedTuners.push(FeedTuner.dedupReposts)
       }
-
       if (preferences?.feedViewPrefs.hideReplies) {
         feedTuners.push(FeedTuner.removeReplies)
       } else {
@@ -41,7 +67,6 @@ export function useFeedTuners(feedDesc: FeedDescriptor) {
           }),
         )
       }
-
       if (preferences?.feedViewPrefs.hideQuotePosts) {
         feedTuners.push(FeedTuner.removeQuotePosts)
       }
diff --git a/src/state/queries/post-feed.ts b/src/state/queries/post-feed.ts
index 4e44c1c69..912548e51 100644
--- a/src/state/queries/post-feed.ts
+++ b/src/state/queries/post-feed.ts
@@ -49,6 +49,7 @@ type AuthorFilter =
   | 'posts_with_media'
 type FeedUri = string
 type ListUri = string
+type ListFilter = 'as_following' // Applies current Following settings. Currently client-side.
 
 export type FeedDescriptor =
   | 'following'
@@ -56,6 +57,7 @@ export type FeedDescriptor =
   | `feedgen|${FeedUri}`
   | `likes|${ActorDid}`
   | `list|${ListUri}`
+  | `list|${ListUri}|${ListFilter}`
 export interface FeedParams {
   disableTuner?: boolean
   mergeFeedEnabled?: boolean