This commit is contained in:
Jackson Harper
2024-07-29 17:38:09 +08:00
parent 137283db0a
commit b29d7d0c97
5 changed files with 11 additions and 3 deletions

View File

@ -245,6 +245,10 @@ export function NotebookContent(props: NotebookContentProps): JSX.Element {
viewInReader={props.viewInReader}
setSetLabelsTarget={setLabelsTarget}
setShowConfirmDeleteHighlightId={setShowConfirmDeleteHighlightId}
updateHighlight={() => {
// nothing should be needed here anymore with new caching
console.log('update highlight')
}}
/>
))}
{sortedHighlights.length === 0 && (

View File

@ -461,7 +461,7 @@ export function LibraryContainer(props: LibraryContainerProps): JSX.Element {
}
break
case 'unsubscribe':
setLinkToUnsubscribe(item.node)
// setLinkToUnsubscribe(item.node)
break
default:
console.warn('unknown action: ', action)
@ -1212,6 +1212,10 @@ export function LibraryItemsLayout(
props.setShowEditTitleModal(false)
props.setLinkToEdit(undefined)
}}
updateItem={async () => {
await Promise.resolve()
console.log('item updated')
}}
item={props.linkToEdit as LibraryItem}
/>
)}

View File

@ -2,7 +2,7 @@ import { useRegisterActions } from 'kbar'
import { useCallback, useState } from 'react'
import { applyStoredTheme } from '../themeUpdater'
import { usePersistedState } from './usePersistedState'
import { TextDirection } from '../networking/queries/useGetArticleQuery'
import { TextDirection } from '../networking/library_items/useLibraryItems'
const DEFAULT_FONT = 'Inter'

View File

@ -385,6 +385,7 @@ export type ArticleAttributes = {
publishedAt?: string
description?: string
wordsCount?: number
originalHtml?: string
contentReader: ContentReader
readingProgressPercent: number
readingProgressTopPercent?: number

View File

@ -44,7 +44,6 @@ import {
useCreateHighlight,
useDeleteHighlight,
useMergeHighlight,
useMergeHighlights,
useUpdateHighlight,
} from '../../../lib/networking/highlights/useItemHighlights'