From 657dcf0ff241cde8b68feb2a4db14160c52058c4 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 5 Oct 2024 14:29:45 +0800 Subject: [PATCH] fix: lists check --- apps/renderer/src/store/subscription/store.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/renderer/src/store/subscription/store.ts b/apps/renderer/src/store/subscription/store.ts index 9ee4125e5..02629b68d 100644 --- a/apps/renderer/src/store/subscription/store.ts +++ b/apps/renderer/src/store/subscription/store.ts @@ -3,6 +3,7 @@ import { omit } from "lodash-es" import { parse } from "tldts" import { whoami } from "~/atoms/user" +import { ROUTE_FEED_IN_LIST } from "~/constants" import { runTransactionInScope } from "~/database" import { apiClient } from "~/lib/api-fetch" import { FeedViewType } from "~/lib/enum" @@ -459,7 +460,7 @@ export const getSubscriptionByFeedId = (feedId: FeedId) => { export const isListSubscription = (feedId?: FeedId) => { if (!feedId) return false - const subscription = getSubscriptionByFeedId(feedId) + const subscription = getSubscriptionByFeedId(feedId.replace(ROUTE_FEED_IN_LIST, "")) if (!subscription) return false return "listId" in subscription && !!subscription.listId }