Skip to content

Commit

Permalink
fix(transition): 修复因 乐观更新 的引入导致点击未读文章时动画丢失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoAria committed Mar 24, 2024
1 parent 579a539 commit 09dab72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Content/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ const Content = ({ info, getEntries, markAllAsRead }) => {
}, 200);

if (entry.status === "unread") {
handleEntryStatusUpdate(entry, "read");
setTimeout(() => {
handleEntryStatusUpdate(entry, "read");
}, 200);

const response = await updateEntryStatus(entry.id, "read");
if (!response) {
Expand Down

0 comments on commit 09dab72

Please sign in to comment.