Skip to content

Commit f96cf01

Browse files
committed
feat: filter adding feeds to lists in lists context menu
1 parent afb79a2 commit f96cf01

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

apps/renderer/src/hooks/biz/useFeedActions.tsx

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -86,26 +86,29 @@ export const useFeedActions = ({
8686
type: "separator" as const,
8787
disabled: isEntryList,
8888
},
89-
{
90-
type: "text" as const,
91-
label: t("sidebar.feed_column.context_menu.add_feeds_to_list"),
92-
enabled: !!listList.data?.length,
93-
submenu: listList.data?.map((list) => ({
94-
label: list.title || "",
95-
type: "text",
96-
icon: list.image,
97-
click() {
98-
return addMutation.mutate({
99-
feedId,
100-
listId: list.id,
101-
})
102-
},
103-
})),
104-
},
105-
{
106-
type: "separator" as const,
107-
disabled: isEntryList,
108-
},
89+
...(!isList
90+
? [
91+
{
92+
type: "text" as const,
93+
label: t("sidebar.feed_column.context_menu.add_feeds_to_list"),
94+
enabled: !!listList.data?.length,
95+
submenu: listList.data?.map((list) => ({
96+
label: list.title || "",
97+
type: "text" as const,
98+
click() {
99+
return addMutation.mutate({
100+
feedId,
101+
listId: list.id,
102+
})
103+
},
104+
})),
105+
},
106+
{
107+
type: "separator" as const,
108+
disabled: isEntryList,
109+
},
110+
]
111+
: []),
109112
{
110113
type: "text" as const,
111114
label: isEntryList ? t("sidebar.feed_actions.edit_feed") : t("sidebar.feed_actions.edit"),

apps/renderer/src/modules/feed-column/category.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ function FeedCategoryImpl({
154154
submenu: listList.data?.map((list) => ({
155155
label: list.title || "",
156156
type: "text",
157-
icon: list.image,
158157
click() {
159158
return addMutation.mutate({
160159
feedIds: ids,

0 commit comments

Comments
 (0)