Skip to content

Commit

Permalink
fix: entry refresh logic (#20)
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei authored May 27, 2024
1 parent 34ce10f commit db45b5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/renderer/src/components/entry-column/index.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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">
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/src/components/feed-column/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/pages/(main)/(context)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function Component() {
const { setActiveEntry } = feedActions
useEffect(() => {
setActiveEntry(null)
}, [activeList])
}, [activeList?.id])

return (
<>
Expand Down

0 comments on commit db45b5e

Please sign in to comment.