fix: entry refresh logic (#20)

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-05-27 21:05:49 +08:00 committed by GitHub
parent 34ce10fea9
commit db45b5e65a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import { cn } from "@renderer/lib/utils"
import { useEntries } from "@renderer/queries/entries"
import { feedActions, useFeedStore } from "@renderer/store"
import { useFeedStore } from "@renderer/store"
import { m } from "framer-motion"
import { ArticleItem } from "./article-item"
@ -46,9 +46,9 @@ export function EntryColumn() {
Item = ArticleItem
}
}
const { setActiveEntry } = feedActions
return (
<div className="px-2" onClick={() => setActiveEntry(null)}>
<div className="px-2">
<div className="mb-5 ml-9">
<div className="text-lg font-bold">{activeList?.name}</div>
<div className="text-xs font-medium text-zinc-400">

View File

@ -140,7 +140,9 @@ export function FeedItem({
{
type: "text",
label: "Open Site in Browser",
click: () => feed.feeds.siteUrl && window.open(feed.feeds.siteUrl, "_blank"),
click: () =>
feed.feeds.siteUrl &&
window.open(feed.feeds.siteUrl, "_blank"),
},
],
e,

View File

@ -21,7 +21,7 @@ export function Component() {
const { setActiveEntry } = feedActions
useEffect(() => {
setActiveEntry(null)
}, [activeList])
}, [activeList?.id])
return (
<>