From 3c10e1a1c4183892e82301bf85ab4e1244c22a06 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Thu, 28 Sep 2023 16:19:26 +0800 Subject: [PATCH] fix: search content was returned if we are syncing a pdf --- src/api.ts | 2 ++ src/settings/template.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api.ts b/src/api.ts index eb0a059..8ad032b 100644 --- a/src/api.ts +++ b/src/api.ts @@ -54,6 +54,7 @@ export interface Article { readingProgressPercent: number; isArchived: boolean; archivedAt?: string; + contentReader?: string; } export interface Label { @@ -122,6 +123,7 @@ export const loadArticles = async ( isArchived readingProgressPercent archivedAt + contentReader highlights { id quote diff --git a/src/settings/template.ts b/src/settings/template.ts index ee42069..e80b1c3 100644 --- a/src/settings/template.ts +++ b/src/settings/template.ts @@ -62,7 +62,7 @@ export type ArticleView = labels?: LabelView[]; dateSaved: string; highlights: HighlightView[]; - content: string; + content?: string; datePublished?: string; fileAttachment?: string; description?: string; @@ -219,7 +219,7 @@ export const renderArticleContnet = async ( labels: renderLabels(article.labels), dateSaved, highlights, - content: article.content, + content: article.contentReader === 'WEB' ? article.content : undefined, datePublished, fileAttachment, description: article.description,