Skip to content

Commit

Permalink
fix(core): trash doc in search result (#7785)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed Aug 8, 2024
1 parent f62d305 commit 83244f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class DocsIndexer extends Entity {
}
);
for (const block of oldBlocks.nodes) {
docIndexWriter.delete(block.id);
blockIndexWriter.delete(block.id);
}
}
await blockIndexWriter.commit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ export class RecentDocsQuickSearchSession

const docRecords = this.recentDocsService.getRecentDocs();

return docRecords.map<QuickSearchItem<'recent-doc', { docId: string }>>(
docRecord => {
return docRecords
.filter(doc => !get(doc.trash$))
.map<QuickSearchItem<'recent-doc', { docId: string }>>(docRecord => {
const { title, icon } =
this.docDisplayMetaService.getDocDisplayMeta(docRecord);

Expand All @@ -54,8 +55,7 @@ export class RecentDocsQuickSearchSession
timestamp: docRecord.meta$.value.updatedDate,
payload: { docId: docRecord.id },
};
}
);
});
});

query(query: string) {
Expand Down

0 comments on commit 83244f0

Please sign in to comment.