diff --git a/apps/desktop/layer/renderer/src/modules/command/commands/entry.tsx b/apps/desktop/layer/renderer/src/modules/command/commands/entry.tsx index ff968cb67..23e76a661 100644 --- a/apps/desktop/layer/renderer/src/modules/command/commands/entry.tsx +++ b/apps/desktop/layer/renderer/src/modules/command/commands/entry.tsx @@ -44,12 +44,14 @@ const category: CommandCategory = "category.entry" const useCollect = () => { const { t } = useTranslation() return useMutation({ - mutationFn: async ({ entryId, view }: { entryId: string; view: FeedViewType }) => - collectionSyncService.starEntry({ + mutationFn: async ({ entryId, view }: { entryId: string; view: FeedViewType }) => { + const { isCollection } = getRouteParams() + return collectionSyncService.starEntry({ entryId, view, - }), - + invalidate: !isCollection, + }) + }, onSuccess: () => { toast.success(t("entry_actions.starred"), { duration: 1000, diff --git a/apps/desktop/layer/renderer/src/modules/entry-column/layouts/EntryListHeader.tsx b/apps/desktop/layer/renderer/src/modules/entry-column/layouts/EntryListHeader.tsx index eeca7e1e6..52e9ff8b1 100644 --- a/apps/desktop/layer/renderer/src/modules/entry-column/layouts/EntryListHeader.tsx +++ b/apps/desktop/layer/renderer/src/modules/entry-column/layouts/EntryListHeader.tsx @@ -16,7 +16,7 @@ import { useNavigate } from "react-router" import { previewBackPath } from "~/atoms/preview" import { useGeneralSettingKey } from "~/atoms/settings/general" import { useTimelineColumnShow } from "~/atoms/sidebar" -import { FEED_COLLECTION_LIST, ROUTE_ENTRY_PENDING } from "~/constants" +import { ROUTE_ENTRY_PENDING } from "~/constants" import { useFollow } from "~/hooks/biz/useFollow" import { getRouteParams, useRouteParams } from "~/hooks/biz/useRouteParams" import { COMMAND_ID } from "~/modules/command/commands/id" @@ -43,13 +43,11 @@ export const EntryListHeader: FC<{ const unreadOnly = useGeneralSettingKey("unreadOnly") - const { feedId, entryId, view } = routerParams + const { feedId, entryId, view, isCollection } = routerParams const isPreview = useIsPreviewFeed() const headerTitle = useFeedHeaderTitle() - const isInCollectionList = feedId === FEED_COLLECTION_LIST - const titleInfo = !!headerTitle && (