diff --git a/apps/renderer/src/modules/entry-column/layouts/EntryListHeader.tsx b/apps/renderer/src/modules/entry-column/layouts/EntryListHeader.tsx index e6fc95cc4..3a6d52740 100644 --- a/apps/renderer/src/modules/entry-column/layouts/EntryListHeader.tsx +++ b/apps/renderer/src/modules/entry-column/layouts/EntryListHeader.tsx @@ -10,9 +10,11 @@ import { ImpressionView } from "~/components/common/ImpressionTracker" import { ActionButton } from "~/components/ui/button" import { DividerVertical } from "~/components/ui/divider" import { RotatingRefreshIcon } from "~/components/ui/loading" +import { Tabs, TabsList, TabsTrigger } from "~/components/ui/tabs" import { EllipsisHorizontalTextWithTooltip } from "~/components/ui/typography" import { FEED_COLLECTION_LIST, ROUTE_ENTRY_PENDING, views } from "~/constants" import { shortcuts } from "~/constants/shortcuts" +import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry" import { useRouteParams } from "~/hooks/biz/useRouteParams" import { useIsOnline } from "~/hooks/common" import { stopPropagation } from "~/lib/dom" @@ -20,8 +22,10 @@ import { FeedViewType } from "~/lib/enum" import { cn, getOS, isBizId } from "~/lib/utils" import { useAIDailyReportModal } from "~/modules/ai/ai-daily/hooks" import { EntryHeader } from "~/modules/entry-content/header" +import { InboxItem, ListItem } from "~/modules/feed-column/item" import { useRefreshFeedMutation } from "~/queries/feed" import { useFeedById, useFeedHeaderTitle } from "~/store/feed" +import { useSubscriptionStore } from "~/store/subscription" import { MarkAllReadWithOverlay } from "../components/mark-all-button" @@ -36,7 +40,7 @@ export const EntryListHeader: FC<{ const unreadOnly = useGeneralSettingKey("unreadOnly") - const { feedId, entryId, view, listId } = routerParams + const { feedId, entryId, view, listId, inboxId } = routerParams const headerTitle = useFeedHeaderTitle() const os = getOS() @@ -44,6 +48,16 @@ export const EntryListHeader: FC<{ const titleAtBottom = IN_ELECTRON && os === "macOS" const isInCollectionList = feedId === FEED_COLLECTION_LIST + const listsData = useSubscriptionStore((state) => + state.feedIdByView[view].map((id) => state.data[id]).filter((s) => "listId" in s), + ) + const inboxData = useSubscriptionStore((state) => + state.feedIdByView[view].map((id) => state.data[id]).filter((s) => "inboxId" in s), + ) + const hasData = listsData.length > 0 || inboxData.length > 0 + + const timeline = listId || inboxId || "" + const titleInfo = !!headerTitle && (