Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-12-20 22:09:05 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-12-20 22:09:05 +0300
commit00446ffb9e63954f126227cc92ae946503e6149c (patch)
treebd84937bba0f33c6890c7d3a14b596960cac662b /apps/files/js/app.js
parent4b0cb0df7f3f68fa9438d3b76ce427aa05a09979 (diff)
Only check whatsnew once per hour
Store the last check in the session storage. (Which gets cleared on logout). And only check once an hour. Saves a request to the server on most requests when browsing. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files/js/app.js')
-rw-r--r--apps/files/js/app.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/js/app.js b/apps/files/js/app.js
index 3630ed7587d..c7393b871b8 100644
--- a/apps/files/js/app.js
+++ b/apps/files/js/app.js
@@ -133,7 +133,10 @@
this._debouncedPersistShowHiddenFilesState = _.debounce(this._persistShowHiddenFilesState, 1200);
- OCP.WhatsNew.query(); // for Nextcloud server
+ if (sessionStorage.getItem('WhatsNewServerCheck') < (Date.now() - 3600*1000)) {
+ OCP.WhatsNew.query(); // for Nextcloud server
+ sessionStorage.setItem('WhatsNewServerCheck', Date.now());
+ }
},
/**