Skip to content

Commit

Permalink
fix: lists check
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Oct 5, 2024
1 parent 4aac049 commit 657dcf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/renderer/src/store/subscription/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

0 comments on commit 657dcf0

Please sign in to comment.