diff options
author | nfebe <fenn25.fn@gmail.com> | 2025-01-11 00:07:19 +0100 |
---|---|---|
committer | F. E Noel Nfebe <fenn25.fn@gmail.com> | 2025-01-29 12:50:12 +0100 |
commit | eecda06f1ad2832cc2a7b31d646458f730c8412a (patch) | |
tree | b934e09e5a6bf7e7668415316546125f23d174f3 /apps/files/src | |
parent | 78ce66766b9a3d629f0f6653507e41822dbae021 (diff) | |
download | nextcloud-server-eecda06f1ad2832cc2a7b31d646458f730c8412a.tar.gz nextcloud-server-eecda06f1ad2832cc2a7b31d646458f730c8412a.zip |
fix(unified-search): Use appId for searching
Each provider may search from a particular app so we should use that for searching.
Before this commit, we used `provider.id` instead of `provider.appId` the problem with the previous
approach is that it forces the provider id to be a valid search provider (an app that supports search)
limiting the developers ability to use unique IDs to identify the different providers (especially plugin providers)
inside the places filter.
For example the Files search plugin "In folder" (search in folder plugin) was required to have id as `files` while the
files provider itself already has id as `files`.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/plugins/search/folderSearch.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/src/plugins/search/folderSearch.ts b/apps/files/src/plugins/search/folderSearch.ts index 2b29c7aec4d..4ba7e34a40e 100644 --- a/apps/files/src/plugins/search/folderSearch.ts +++ b/apps/files/src/plugins/search/folderSearch.ts @@ -21,7 +21,7 @@ function init() { logger.info('Initializing unified search plugin: folder search from files app') OCA.UnifiedSearch.registerFilterAction({ - id: 'files', + id: 'in-folder', appId: 'files', label: t('files', 'In folder'), icon: imagePath('files', 'app.svg'), @@ -35,7 +35,8 @@ function init() { logger.info('Folder picked', { folder: nodes[0] }) const folder = nodes[0] emit('nextcloud:unified-search:add-filter', { - id: 'files', + id: 'in-folder', + appId: 'files', payload: folder, filterUpdateText: t('files', 'Search in folder: {folder}', { folder: folder.basename }), filterParams: { path: folder.path }, |