Skip to content

Commit

Permalink
skip resource loading on personal view route redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
fschade committed Jun 2, 2021
1 parent 62ea1e6 commit 7e865f8
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions packages/web-app-files/src/views/Personal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
>
<span id="files-list-count-folders" v-text="activeFilesCount.folders" />
<translate :translate-n="activeFilesCount.folders" translate-plural="folders"
>folder</translate
>
>folder
</translate>
<translate>and</translate>
<span id="files-list-count-files" v-text="activeFilesCount.files" />
<translate :translate-n="activeFilesCount.files" translate-plural="files"
>file</translate
>
>file
</translate>
<template v-if="activeFiles.length > 0">
&ndash; {{ getResourceSize(filesTotalSize) }}
</template>
Expand Down Expand Up @@ -137,7 +137,17 @@ export default {
watch: {
$route: {
handler: function() {
this.checkHomeFallback()
if (isNil(this.$route.params.item)) {
this.$router.push({
name: 'files-personal',
params: {
item: this.homeFolder
}
})
return
}
this.loadResources()
},
immediate: true
Expand Down Expand Up @@ -166,17 +176,6 @@ export default {
]),
...mapMutations(['SET_QUOTA']),
checkHomeFallback() {
if (isNil(this.$route.params.item)) {
this.$router.push({
name: 'files-personal',
params: {
item: this.homeFolder
}
})
}
},
async loadResources() {
this.loading = true
this.CLEAR_CURRENT_FILES_LIST()
Expand Down

0 comments on commit 7e865f8

Please sign in to comment.