import type { FeedViewType } from "@follow/constants" import { unreadSyncService } from "@follow/store/unread/store" import type { FC, PropsWithChildren } from "react" import { useTranslation } from "react-i18next" import { getHideAllReadSubscriptions } from "@/src/atoms/settings/general" import { ContextMenu } from "@/src/components/ui/context-menu" export const TimelineViewSelectorContextMenu: FC< PropsWithChildren<{ type: string | undefined; viewId: FeedViewType | undefined }> > = ({ children, type, viewId }) => { const { t } = useTranslation() if (type !== "view" || viewId === undefined) return children return ( {children} { unreadSyncService.markViewAsRead({ view: viewId, excludePrivate: getHideAllReadSubscriptions(), }) }} > {t("operation.mark_as_read")} ) }