Skip to content

Commit

Permalink
Fix bug in blank list filtered search resulting in duped page annots
Browse files Browse the repository at this point in the history
  • Loading branch information
poltak committed Jun 18, 2024
1 parent e386bbb commit dca0060
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/dashboard-refactor/search-results/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ export default class SearchResultsContainer extends React.Component<
const noteB = this.props.noteData.byId[b]
return noteB.displayTime - noteA.displayTime
})
?.map((noteId, index) => {
.map((noteId, index) => {
const zIndex =
noteIds[notesType]?.length - index

Expand Down
12 changes: 7 additions & 5 deletions src/search/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,13 @@ export default class SearchBackground {
.toArray()
let autoSharedAnnotIds = new Set(
annotPrivacyLevels
.filter((l) =>
[
AnnotationPrivacyLevels.SHARED,
AnnotationPrivacyLevels.SHARED_PROTECTED,
].includes(l.privacyLevel),
.filter(
(l) =>
[
AnnotationPrivacyLevels.SHARED,
AnnotationPrivacyLevels.SHARED_PROTECTED,
].includes(l.privacyLevel) &&
!validAnnotIds.has(l.annotation),
)
.map((l) => l.annotation),
)
Expand Down

0 comments on commit dca0060

Please sign in to comment.