@@ -10,11 +10,12 @@ import { LoadingCircle } from "~/components/ui/loading"
10
10
import { ROUTE_FEED_IN_FOLDER , views } from "~/constants"
11
11
import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry"
12
12
import { getRouteParams , useRouteParamsSelector } from "~/hooks/biz/useRouteParams"
13
- import { useAnyPointDown , useInputComposition } from "~/hooks/common"
13
+ import { useAnyPointDown , useAuthQuery , useInputComposition } from "~/hooks/common"
14
14
import { stopPropagation } from "~/lib/dom"
15
15
import type { FeedViewType } from "~/lib/enum"
16
16
import { showNativeMenu } from "~/lib/native-menu"
17
17
import { cn , sortByAlphabet } from "~/lib/utils"
18
+ import { subscription as subscriptionQuery } from "~/queries/subscriptions"
18
19
import { getPreferredTitle , useAddFeedToFeedList , useFeedStore } from "~/store/feed"
19
20
import { useOwnedList } from "~/store/list"
20
21
import { subscriptionActions , useSubscriptionByFeedId } from "~/store/subscription"
@@ -132,6 +133,7 @@ function FeedCategoryImpl({ data: ids, view, categoryOpenStateData }: FeedCatego
132
133
const addMutation = useAddFeedToFeedList ( )
133
134
134
135
const listList = useOwnedList ( view ! )
136
+ const categories = useAuthQuery ( subscriptionQuery . categories ( ) )
135
137
136
138
return (
137
139
< div tabIndex = { - 1 } onClick = { stopPropagation } >
@@ -219,7 +221,8 @@ function FeedCategoryImpl({ data: ids, view, categoryOpenStateData }: FeedCatego
219
221
{
220
222
type : "text" ,
221
223
label : t ( "sidebar.feed_column.context_menu.delete_category" ) ,
222
- click : async ( ) => {
224
+ hide : ! folderName || ! categories . data ?. includes ( folderName ) ,
225
+ click : ( ) => {
223
226
present ( {
224
227
title : t ( "sidebar.feed_column.context_menu.delete_category_confirmation" , {
225
228
folderName,
0 commit comments