Skip to content

Commit

Permalink
fix(lists): fix duplicate addition issue in manage feeds functionality (
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonyiyi authored Jan 11, 2025
1 parent 0227427 commit d77ed3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/renderer/src/modules/settings/tabs/lists/modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,11 @@ export const ListFeedsModalContent = ({ id }: { id: string }) => {
const { t } = useTranslation("settings")

const [feedSearchFor, setFeedSearchFor] = useState("")
const selectedFeedIdRef = useRef<string | null>()
const addMutation = useAddFeedToFeedList({
onSuccess: () => {
setFeedSearchFor("")
selectedFeedIdRef.current = null
},
})

Expand All @@ -230,7 +232,6 @@ export const ListFeedsModalContent = ({ id }: { id: string }) => {
}))
}, [allFeeds, list?.feedIds])

const selectedFeedIdRef = useRef<string | null>()
if (!list) return null
return (
<>
Expand Down

0 comments on commit d77ed3c

Please sign in to comment.