Skip to content

Commit

Permalink
fix(files): fix default sorting direction
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <[email protected]>
  • Loading branch information
skjnldsv authored and susnux committed Nov 9, 2023
1 parent cc0f8c1 commit 4d7e260
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions apps/files/src/mixins/filesSorting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import type { Navigation, View } from '@nextcloud/files'
import Vue from 'vue'

import { mapState } from 'pinia'
import { useViewConfigStore } from '../store/viewConfig'
import { Navigation, View } from '@nextcloud/files'

export default Vue.extend({
computed: {
Expand All @@ -46,7 +46,8 @@ export default Vue.extend({
* Get the sorting direction for the current view
*/
isAscSorting(): boolean {
const sortingDirection = this.getConfig(this.currentView.id)?.sorting_direction
const sortingDirection = this.getConfig(this.currentView.id)?.sorting_direction as string
|| 'asc'
return sortingDirection === 'asc'
},
},
Expand Down
3 changes: 0 additions & 3 deletions apps/files/src/views/FilesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ import { usePathsStore } from '../store/paths.ts'
import { useSelectionStore } from '../store/selection.ts'
import { useUploaderStore } from '../store/uploader.ts'
import { useUserConfigStore } from '../store/userconfig.ts'
import { useViewConfigStore } from '../store/viewConfig.ts'
import BreadCrumbs from '../components/BreadCrumbs.vue'
import FilesListVirtual from '../components/FilesListVirtual.vue'
import filesListWidthMixin from '../mixins/filesListWidth.ts'
Expand Down Expand Up @@ -165,14 +164,12 @@ export default Vue.extend({
const selectionStore = useSelectionStore()
const uploaderStore = useUploaderStore()
const userConfigStore = useUserConfigStore()
const viewConfigStore = useViewConfigStore()
return {
filesStore,
pathsStore,
selectionStore,
uploaderStore,
userConfigStore,
viewConfigStore,
}
},
Expand Down

0 comments on commit 4d7e260

Please sign in to comment.