summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-05-04 13:23:04 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-05-04 13:29:49 +0200
commit8d66e325a9375dc06c8105a30e795965e1b73773 (patch)
treecabee441f557b6b61529da375443e777c7a60298 /apps/files/js/filelist.js
parentb04102aab364a62c7a7c3f5cbae9fd0d672842f5 (diff)
downloadnextcloud-server-8d66e325a9375dc06c8105a30e795965e1b73773.tar.gz
nextcloud-server-8d66e325a9375dc06c8105a30e795965e1b73773.zip
Do not reload the filelist on first open
Fixes: #4644 Without this patch the filelist would always reload. However since not all the correct data was set yet it would often: 1. fireoff a propfind to ../webdav/ 2. fireoff a propfind to ../webdav/<PATH> When just opening the file list those are the same so the result is just fine. However if opening a direct link it means that there is a race condition on which finishes first. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index db85caf65fa..187ede8c0bd 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -92,6 +92,12 @@
initialized: false,
/**
+ * Wheater the file list was already shown once
+ * @type boolean
+ */
+ shown: false,
+
+ /**
* Number of files per page
*
* @return {int} page size
@@ -557,7 +563,10 @@
* Event handler when leaving previously hidden state
*/
_onShow: function(e) {
- this.reload();
+ if (this.shown) {
+ this.reload();
+ }
+ this.shown = true;
},
/**