fix(core): trash doc in search result (#7785)

This commit is contained in:
EYHN
2024-08-08 08:17:48 +00:00
parent f62d30527b
commit 83244f0201
2 changed files with 5 additions and 5 deletions

View File

@@ -173,7 +173,7 @@ export class DocsIndexer extends Entity {
} }
); );
for (const block of oldBlocks.nodes) { for (const block of oldBlocks.nodes) {
docIndexWriter.delete(block.id); blockIndexWriter.delete(block.id);
} }
} }
await blockIndexWriter.commit(); await blockIndexWriter.commit();

View File

@@ -37,8 +37,9 @@ export class RecentDocsQuickSearchSession
const docRecords = this.recentDocsService.getRecentDocs(); const docRecords = this.recentDocsService.getRecentDocs();
return docRecords.map<QuickSearchItem<'recent-doc', { docId: string }>>( return docRecords
docRecord => { .filter(doc => !get(doc.trash$))
.map<QuickSearchItem<'recent-doc', { docId: string }>>(docRecord => {
const { title, icon } = const { title, icon } =
this.docDisplayMetaService.getDocDisplayMeta(docRecord); this.docDisplayMetaService.getDocDisplayMeta(docRecord);
@@ -54,8 +55,7 @@ export class RecentDocsQuickSearchSession
timestamp: docRecord.meta$.value.updatedDate, timestamp: docRecord.meta$.value.updatedDate,
payload: { docId: docRecord.id }, payload: { docId: docRecord.id },
}; };
} });
);
}); });
query(query: string) { query(query: string) {