diff --git a/apps/renderer/src/modules/feed-column/category.tsx b/apps/renderer/src/modules/feed-column/category.tsx index a0de62ca6..c767fb1f2 100644 --- a/apps/renderer/src/modules/feed-column/category.tsx +++ b/apps/renderer/src/modules/feed-column/category.tsx @@ -455,7 +455,7 @@ type SortListProps = { view: FeedViewType showCollapse: boolean } -const SortedFeedItems = (props: SortListProps) => { +const SortedFeedItems = memo((props: SortListProps) => { const by = useFeedListSortSelector((s) => s.by) switch (by) { case "count": { @@ -469,7 +469,7 @@ const SortedFeedItems = (props: SortListProps) => { return } } -} +}) const SortByAlphabeticalList = (props: SortListProps) => { const { ids, showCollapse, view } = props diff --git a/apps/renderer/src/modules/feed-column/item.tsx b/apps/renderer/src/modules/feed-column/item.tsx index 38df38d63..c72896975 100644 --- a/apps/renderer/src/modules/feed-column/item.tsx +++ b/apps/renderer/src/modules/feed-column/item.tsx @@ -40,6 +40,26 @@ interface FeedItemProps { view?: number className?: string } + +const DraggableItemWrapper: Component< + { + className?: string + isInMultipleSelection: boolean + } & React.HTMLAttributes +> = ({ children, isInMultipleSelection, ...props }) => { + const draggableContext = useContext(DraggableContext) + + return ( +
+ {children} +
+ ) +} const FeedItemImpl = ({ view, feedId, className }: FeedItemProps) => { const { t } = useTranslation() const subscription = useSubscriptionByFeedId(feedId) @@ -60,7 +80,7 @@ const FeedItemImpl = ({ view, feedId, className }: FeedItemProps) => { }) const [selectedFeedIds, setSelectedFeedIds] = useSelectedFeedIdsState() - const draggableContext = useContext(DraggableContext) + const isMobile = useMobile() const isInMultipleSelection = !isMobile && selectedFeedIds.includes(feedId) const isMultiSelectingButNotSelected = @@ -141,79 +161,71 @@ const FeedItemImpl = ({ view, feedId, className }: FeedItemProps) => { const isFeed = feed.type === "feed" || !feed.type return ( - <> + { + window.open(UrlBuilder.shareFeed(feedId, view), "_blank") + }} + {...contextMenuProps} + >
{ - window.open(UrlBuilder.shareFeed(feedId, view), "_blank") - }} - {...contextMenuProps} > -
- - - {isFeed && feed.errorAt && ( - - - - - - + + + {isFeed && feed.errorAt && ( + + + + + + +
+ + {t("feed_item.error_since")}{" "} + {dayjs + .duration(dayjs(feed.errorAt).diff(dayjs(), "minute"), "minute") + .humanize(true)} +
+ {!!feed.errorMessage && (
- - {t("feed_item.error_since")}{" "} - {dayjs - .duration(dayjs(feed.errorAt).diff(dayjs(), "minute"), "minute") - .humanize(true)} + + {feed.errorMessage}
- {!!feed.errorMessage && ( -
- - {feed.errorMessage} -
- )} -
-
-
- )} - {subscription.isPrivate && ( - - - - - - {t("feed_item.not_publicly_visible")} - - - )} -
- + )} + + + + )} + {subscription.isPrivate && ( + + + + + + {t("feed_item.not_publicly_visible")} + + + )}
- + +
) }