fix(reader): trigger archive animation even if already archived on auto-complete

This commit is contained in:
Gigi
2025-10-20 13:17:35 +02:00
parent 96f59a54f3
commit 6f9c0a35e2

View File

@@ -190,8 +190,13 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
onSave: handleSavePosition,
onReadingComplete: () => {
// Auto-mark as read when reading is complete (if enabled in settings)
if (activeAccount && !isMarkedAsRead && settings?.autoMarkAsReadOnCompletion) {
if (!settings?.autoMarkAsReadOnCompletion || !activeAccount) return
if (!isMarkedAsRead) {
handleMarkAsRead()
} else {
// Already archived: still show the success animation for feedback
setShowCheckAnimation(true)
setTimeout(() => setShowCheckAnimation(false), 600)
}
}
})