mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
fix(core): trash doc in search result (#7785)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -54,8 +55,7 @@ export class RecentDocsQuickSearchSession
|
||||
timestamp: docRecord.meta$.value.updatedDate,
|
||||
payload: { docId: docRecord.id },
|
||||
};
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
query(query: string) {
|
||||
|
||||
Reference in New Issue
Block a user