diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2023-04-11 13:56:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 13:56:10 +0200 |
commit | a05176a1f592d06b24725cd158baaf85e4456c6d (patch) | |
tree | c74eb30753c08662ebab40185e882f54e15eee42 /apps/files/src/store/files.ts | |
parent | c6645cbc46291d2621992b7f0bb087f115e849eb (diff) | |
parent | 8bef77235f4dc23df0e0f0feb959e69d1693d9be (diff) | |
download | nextcloud-server-a05176a1f592d06b24725cd158baaf85e4456c6d.tar.gz nextcloud-server-a05176a1f592d06b24725cd158baaf85e4456c6d.zip |
Merge pull request #37639 from nextcloud/feat/files/selection
Diffstat (limited to 'apps/files/src/store/files.ts')
-rw-r--r-- | apps/files/src/store/files.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/src/store/files.ts b/apps/files/src/store/files.ts index 27b6b12f348..d276b6bf0b7 100644 --- a/apps/files/src/store/files.ts +++ b/apps/files/src/store/files.ts @@ -27,6 +27,7 @@ import { defineStore } from 'pinia' import { subscribe } from '@nextcloud/event-bus' import Vue from 'vue' import logger from '../logger' +import { FileId } from '../types' export const useFilesStore = () => { const store = defineStore('files', { @@ -39,13 +40,13 @@ export const useFilesStore = () => { /** * Get a file or folder by id */ - getNode: (state) => (id: number): Node|undefined => state.files[id], + getNode: (state) => (id: FileId): Node|undefined => state.files[id], /** * Get a list of files or folders by their IDs * Does not return undefined values */ - getNodes: (state) => (ids: number[]): Node[] => ids + getNodes: (state) => (ids: FileId[]): Node[] => ids .map(id => state.files[id]) .filter(Boolean), /** |