mirror of
https://github.com/dergigi/boris.git
synced 2026-01-26 18:24:22 +01:00
chore: merge master into reading-progress-filters-part-two
Resolved conflicts by keeping feature branch changes: - Kept /me/reads and /me/links routes (not /me/archive) - Kept ReadingProgressFilters component and readingProgressUtils - Kept readsService, linksService, and readingDataProcessor - Restored files that were renamed/deleted in master
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { Highlight } from '../types/highlights'
|
||||
import { Bookmark } from '../types/bookmarks'
|
||||
import { ReadItem } from './readsService'
|
||||
import { BlogPostPreview } from './exploreService'
|
||||
|
||||
export interface MeCache {
|
||||
highlights: Highlight[]
|
||||
bookmarks: Bookmark[]
|
||||
reads: ReadItem[]
|
||||
links: ReadItem[]
|
||||
readArticles: BlogPostPreview[]
|
||||
timestamp: number
|
||||
}
|
||||
|
||||
@@ -22,14 +21,12 @@ export function setCachedMeData(
|
||||
pubkey: string,
|
||||
highlights: Highlight[],
|
||||
bookmarks: Bookmark[],
|
||||
reads: ReadItem[],
|
||||
links: ReadItem[] = []
|
||||
readArticles: BlogPostPreview[]
|
||||
): void {
|
||||
meCache.set(pubkey, {
|
||||
highlights,
|
||||
bookmarks,
|
||||
reads,
|
||||
links,
|
||||
readArticles,
|
||||
timestamp: Date.now()
|
||||
})
|
||||
}
|
||||
@@ -48,10 +45,10 @@ export function updateCachedBookmarks(pubkey: string, bookmarks: Bookmark[]): vo
|
||||
}
|
||||
}
|
||||
|
||||
export function updateCachedReads(pubkey: string, reads: ReadItem[]): void {
|
||||
export function updateCachedReadArticles(pubkey: string, readArticles: BlogPostPreview[]): void {
|
||||
const existing = meCache.get(pubkey)
|
||||
if (existing) {
|
||||
meCache.set(pubkey, { ...existing, reads, timestamp: Date.now() })
|
||||
meCache.set(pubkey, { ...existing, readArticles, timestamp: Date.now() })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,6 @@ export interface UserSettings {
|
||||
paragraphAlignment?: 'left' | 'justify' // default: justify
|
||||
// Reading position sync
|
||||
syncReadingPosition?: boolean // default: false (opt-in)
|
||||
autoScrollToPosition?: boolean // default: true (auto-scroll to last reading position)
|
||||
autoMarkAsReadAt100?: boolean // default: false (auto-mark as read when reaching 100% for 2 seconds)
|
||||
}
|
||||
|
||||
export async function loadSettings(
|
||||
|
||||
Reference in New Issue
Block a user