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) {
|
for (const block of oldBlocks.nodes) {
|
||||||
docIndexWriter.delete(block.id);
|
blockIndexWriter.delete(block.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await blockIndexWriter.commit();
|
await blockIndexWriter.commit();
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user