mirror of
https://github.com/dergigi/boris.git
synced 2025-12-21 16:44:19 +01:00
feat: make reading position sync default-on in runtime paths
- Treat undefined as enabled in ContentPanel (only false disables) - Keeps DEFAULT_SETTINGS at true; ensures consistent behavior even for users without the new setting persisted yet
This commit is contained in:
@@ -194,7 +194,7 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
|
||||
const { isReadingComplete, progressPercentage, saveNow } = useReadingPosition({
|
||||
enabled: isTextContent,
|
||||
syncEnabled: settings?.syncReadingPosition,
|
||||
syncEnabled: settings?.syncReadingPosition !== false,
|
||||
onSave: handleSavePosition,
|
||||
onReadingComplete: () => {
|
||||
// Auto-mark as read when reading is complete (if enabled in settings)
|
||||
@@ -209,7 +209,7 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
useEffect(() => {
|
||||
console.log('[progress] 📊 ContentPanel reading position sync status:', {
|
||||
enabled: isTextContent,
|
||||
syncEnabled: settings?.syncReadingPosition,
|
||||
syncEnabled: settings?.syncReadingPosition !== false,
|
||||
hasAccount: !!activeAccount,
|
||||
hasRelayPool: !!relayPool,
|
||||
hasEventStore: !!eventStore,
|
||||
@@ -230,8 +230,8 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!settings?.syncReadingPosition) {
|
||||
console.log('⏭️ [ContentPanel] Sync disabled - not restoring position')
|
||||
if (settings?.syncReadingPosition === false) {
|
||||
console.log('⏭️ [ContentPanel] Sync disabled in settings - not restoring position')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user