aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
authorGrigorii K. Shartsev <me@shgk.me>2023-10-31 00:21:56 +0100
committerGrigorii K. Shartsev <me@shgk.me>2023-10-31 01:17:22 +0100
commitffda3db9e460e1e11dda784e41fcea198d5ec47f (patch)
tree02aee936394c928012134d56cb9931d5c6858d61 /apps/files/src
parent2aa15a1afe4ce99c60e8a721d4895e8339c0275e (diff)
downloadnextcloud-server-ffda3db9e460e1e11dda784e41fcea198d5ec47f.tar.gz
nextcloud-server-ffda3db9e460e1e11dda784e41fcea198d5ec47f.zip
fix(files): add silent mode in legacy navigation
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Diffstat (limited to 'apps/files/src')
-rw-r--r--apps/files/src/views/Navigation.vue12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/files/src/views/Navigation.vue b/apps/files/src/views/Navigation.vue
index e164880003a..d4dbb7899aa 100644
--- a/apps/files/src/views/Navigation.vue
+++ b/apps/files/src/views/Navigation.vue
@@ -228,16 +228,20 @@ export default {
* Coming from the legacy files app.
* TODO: remove when all views are migrated.
*
- * @param {Navigation} view the new active view
+ * @param {object} payload the payload
+ * @param {string} [payload.id='files'] the view id
+ * @param {boolean} [payload.silent=false] if true, the view will not be shown immediately
*/
- onLegacyNavigationChanged({ id } = { id: 'files' }) {
+ onLegacyNavigationChanged({ id = 'files', silent = false } = {}) {
const view = this.Navigation.views.find(view => view.id === id)
if (view && view.legacy && view.id !== this.currentView.id) {
// Force update the current route as the request comes
// from the legacy files app router
this.$router.replace({ ...this.$route, params: { view: view.id } })
- this.Navigation.setActive(view)
- this.showView(view)
+ if (!silent) {
+ this.Navigation.setActive(view)
+ this.showView(view)
+ }
}
},