Skip to content

Commit c29b26d

Browse files
committed
feat: Exclude shared drives dir from filepicker
It is not to be displayed in the filepicker, just like the trash dir
1 parent aa2705f commit c29b26d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

react/FilePicker/queries.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const FILES_DOCTYPE = 'io.cozy.files'
44

55
const defaultFetchPolicy = fetchPolicies.olderThan(30 * 1000)
66
const TRASH_DIR_ID = `${FILES_DOCTYPE}.trash-dir`
7+
const SHARED_DRIVES_DIR_ID = `${FILES_DOCTYPE}.shared-drives-dir`
78

89
export const buildCurrentFolderQuery = folderId => ({
910
definition: () => Q(FILES_DOCTYPE).getById(folderId),
@@ -23,7 +24,7 @@ export const buildContentFolderQuery = dirId => ({
2324
})
2425
.partialIndex({
2526
_id: {
26-
$ne: TRASH_DIR_ID
27+
$nin: [SHARED_DRIVES_DIR_ID, TRASH_DIR_ID]
2728
}
2829
})
2930
.indexFields(['dir_id', 'type', 'name'])

0 commit comments

Comments
 (0)