mirror of
https://github.com/dergigi/boris.git
synced 2026-01-19 06:44:23 +01:00
debug: add logs to show why reading position saves are skipped
- Log when scheduleSave returns early (syncEnabled false, no onSave callback) - Log when position is too low (<5%) - Log when change is not significant enough (<1%) - Log ContentPanel sync status (enabled, settings, requirements) - This will help diagnose why no events are being created
This commit is contained in:
@@ -199,11 +199,24 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
onReadingComplete: () => {
|
||||
// Auto-mark as read when reading is complete (if enabled in settings)
|
||||
if (activeAccount && !isMarkedAsRead && settings?.autoMarkAsReadOnCompletion) {
|
||||
console.log('📖 [ContentPanel] Auto-marking as read on completion')
|
||||
console.log('[progress] 📖 Auto-marking as read on completion')
|
||||
handleMarkAsRead()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// Log sync status when it changes
|
||||
useEffect(() => {
|
||||
console.log('[progress] 📊 ContentPanel reading position sync status:', {
|
||||
enabled: isTextContent,
|
||||
syncEnabled: settings?.syncReadingPosition,
|
||||
hasAccount: !!activeAccount,
|
||||
hasRelayPool: !!relayPool,
|
||||
hasEventStore: !!eventStore,
|
||||
hasArticleIdentifier: !!articleIdentifier,
|
||||
currentProgress: progressPercentage + '%'
|
||||
})
|
||||
}, [isTextContent, settings?.syncReadingPosition, activeAccount, relayPool, eventStore, articleIdentifier, progressPercentage])
|
||||
|
||||
// Load saved reading position when article loads
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user