diff options
Diffstat (limited to 'apps/files/src/mixins/filesSorting.ts')
-rw-r--r-- | apps/files/src/mixins/filesSorting.ts | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/files/src/mixins/filesSorting.ts b/apps/files/src/mixins/filesSorting.ts index 53c747fa29b..12515db103f 100644 --- a/apps/files/src/mixins/filesSorting.ts +++ b/apps/files/src/mixins/filesSorting.ts @@ -6,16 +6,20 @@ import Vue from 'vue' import { mapState } from 'pinia' import { useViewConfigStore } from '../store/viewConfig' -import { Navigation, View } from '@nextcloud/files' +import { useNavigation } from '../composables/useNavigation' export default Vue.extend({ + setup() { + const { currentView } = useNavigation() + + return { + currentView, + } + }, + computed: { ...mapState(useViewConfigStore, ['getConfig', 'setSortingBy', 'toggleSortingDirection']), - currentView(): View { - return (this.$navigation as Navigation).active as View - }, - /** * Get the sorting mode for the current view */ |