summaryrefslogtreecommitdiffstats
path: root/apps/files/js/app.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-12-20 20:09:05 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-12-20 20:09:05 +0100
commit00446ffb9e63954f126227cc92ae946503e6149c (patch)
treebd84937bba0f33c6890c7d3a14b596960cac662b /apps/files/js/app.js
parent4b0cb0df7f3f68fa9438d3b76ce427aa05a09979 (diff)
downloadnextcloud-server-00446ffb9e63954f126227cc92ae946503e6149c.tar.gz
nextcloud-server-00446ffb9e63954f126227cc92ae946503e6149c.zip
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());
+ }
},
/**