mirror of
https://github.com/dergigi/boris.git
synced 2026-01-31 12:44:37 +01:00
refactor: remove versioning from reading progress implementation
- Remove 'ver' field from ReadingProgressContent interface - Remove ver: '1' from saveReadingPosition function - Update PROGRESS_CACHE_KEY to remove v1 suffix
This commit is contained in:
@@ -19,7 +19,6 @@ export interface ReadingProgressContent {
|
||||
progress: number // 0-1 scroll progress
|
||||
ts?: number // Unix timestamp (optional, for display)
|
||||
loc?: number // Optional: pixel position
|
||||
ver?: string // Schema version
|
||||
}
|
||||
|
||||
// Helper to extract and parse reading progress from event (kind 39802)
|
||||
@@ -117,8 +116,7 @@ export async function saveReadingPosition(
|
||||
const progressContent: ReadingProgressContent = {
|
||||
progress: position.position,
|
||||
ts: position.timestamp,
|
||||
loc: position.scrollTop,
|
||||
ver: '1'
|
||||
loc: position.scrollTop
|
||||
}
|
||||
|
||||
const tags = generateProgressTags(articleIdentifier)
|
||||
|
||||
@@ -13,7 +13,7 @@ type ProgressMapCallback = (progressMap: Map<string, number>) => void
|
||||
type LoadingCallback = (loading: boolean) => void
|
||||
|
||||
const LAST_SYNCED_KEY = 'reading_progress_last_synced'
|
||||
const PROGRESS_CACHE_KEY = 'reading_progress_cache_v1'
|
||||
const PROGRESS_CACHE_KEY = 'reading_progress_cache'
|
||||
|
||||
/**
|
||||
* Shared reading progress controller
|
||||
|
||||
Reference in New Issue
Block a user