Skip to content

Commit

Permalink
feat: isPrivate
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed May 14, 2024
1 parent e4c92d1 commit ea59a4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/renderer/src/components/feed-column/context-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function FeedContextMenu({
url: variables.feeds.url,
view: feed.view,
category: variables.category,
// private: variables.private,
isPrivate: variables.isPrivate,
},
})
queryClient.invalidateQueries({
Expand Down
7 changes: 4 additions & 3 deletions src/renderer/src/components/follow/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { SubscriptionResponse } from "@renderer/lib/types"
const formSchema = z.object({
view: z.string(),
category: z.string().optional(),
private: z.boolean().optional(),
isPrivate: z.boolean().optional(),
})

export function FollowDialog({
Expand All @@ -62,6 +62,7 @@ export function FollowDialog({
defaultValues: {
view: isSubscribed ? feed.view + "" : "0",
category: isSubscribed ? feed.category : undefined,
isPrivate: isSubscribed ? feed.isPrivate : false,
},
})

Expand All @@ -74,7 +75,7 @@ export function FollowDialog({
url: feed.feeds.url,
view: parseInt(values.view),
category: values.category,
private: values.private,
isPrivate: values.isPrivate,
},
}),
onSuccess: (_, variables) => {
Expand Down Expand Up @@ -149,7 +150,7 @@ export function FollowDialog({
/>
<FormField
control={form.control}
name="private"
name="isPrivate"
render={({ field }) => (
<FormItem>
<div>
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type SubscriptionResponse = {
view: number
category?: string
title?: string
isPrivate?: boolean
unread?: number
feeds: FeedResponse
}[]
Expand Down

0 comments on commit ea59a4f

Please sign in to comment.