mirror of
https://github.com/dergigi/boris.git
synced 2026-01-16 21:34:21 +01:00
refactor: remove synthetic added_at field, use created_at from bookmark list event
This commit is contained in:
@@ -87,7 +87,7 @@ export const renderParsedContent = (parsedContent: ParsedContent) => {
|
||||
export const sortIndividualBookmarks = (items: IndividualBookmark[]) => {
|
||||
return items
|
||||
.slice()
|
||||
.sort((a, b) => ((b.added_at || 0) - (a.added_at || 0)) || ((b.created_at || 0) - (a.created_at || 0)))
|
||||
.sort((a, b) => (b.created_at || 0) - (a.created_at || 0))
|
||||
}
|
||||
|
||||
export function groupIndividualBookmarks(items: IndividualBookmark[]) {
|
||||
|
||||
@@ -51,7 +51,7 @@ export function deriveLinksFromBookmarks(bookmarks: Bookmark[]): ReadItem[] {
|
||||
summary,
|
||||
image,
|
||||
readingProgress: 0,
|
||||
readingTimestamp: bookmark.added_at || bookmark.created_at
|
||||
readingTimestamp: bookmark.created_at
|
||||
}
|
||||
|
||||
linksMap.set(url, item)
|
||||
|
||||
@@ -49,7 +49,7 @@ export function deriveReadsFromBookmarks(bookmarks: Bookmark[]): ReadItem[] {
|
||||
source: 'bookmark',
|
||||
type: 'article',
|
||||
readingProgress: 0,
|
||||
readingTimestamp: bookmark.added_at || bookmark.created_at,
|
||||
readingTimestamp: bookmark.created_at,
|
||||
title,
|
||||
summary,
|
||||
image,
|
||||
|
||||
Reference in New Issue
Block a user