Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: ignore trash (#1426)

Himself65f459b07fa262
diff --git a/apps/web/src/components/pure/quick-search-modal/Results.tsx b/apps/web/src/components/pure/quick-search-modal/Results.tsx
index f887f0b8b0..1f0d5e91bd 100644
--- a/apps/web/src/components/pure/quick-search-modal/Results.tsx
+++ b/apps/web/src/components/pure/quick-search-modal/Results.tsx
@@ -93,27 +93,32 @@ export const Results: React.FC<ResultsProps> = ({
<div>
{recentlyViewed.length > 0 && (
<Command.Group heading={t('Recent')}>
- {recentlyViewed.map(recent => {
- return (
- <Command.Item
- key={recent.id}
- value={recent.id}
- onSelect={() => {
- onClose();
- jumpToPage(blockSuiteWorkspace.id, recent.id);
- }}
- >
- <StyledListItem>
- {recent.mode === 'edgeless' ? (
- <EdgelessIcon />
- ) : (
- <PaperIcon />
- )}
- <span>{recent.title}</span>
- </StyledListItem>
- </Command.Item>
- );
- })}
+ {recentlyViewed
+ .filter(
+ recent =>
+ pageList.find(page => recent.id === page.id)?.trash !== true
+ )
+ .map(recent => {
+ return (
+ <Command.Item
+ key={recent.id}
+ value={recent.id}
+ onSelect={() => {
+ onClose();
+ jumpToPage(blockSuiteWorkspace.id, recent.id);
+ }}
+ >
+ <StyledListItem>
+ {recent.mode === 'edgeless' ? (
+ <EdgelessIcon />
+ ) : (
+ <PaperIcon />
+ )}
+ <span>{recent.title}</span>
+ </StyledListItem>
+ </Command.Item>
+ );
+ })}
</Command.Group>
)}