aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/js/app.js')
-rw-r--r--frontend/js/app.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/frontend/js/app.js b/frontend/js/app.js
index e9d469b..6303a89 100644
--- a/frontend/js/app.js
+++ b/frontend/js/app.js
@@ -35,7 +35,13 @@ function getProfile(accessToken, callback) {
35 app.session.username = result.body.username; 35 app.session.username = result.body.username;
36 app.session.valid = true; 36 app.session.valid = true;
37 37
38 callback(); 38 superagent.get('/api/settings').query({ access_token: localStorage.accessToken }).end(function (error, result) {
39 if (error) console.error(error);
40
41 app.folderListingEnabled = !!result.body.folderListingEnabled;
42
43 callback();
44 });
39 }); 45 });
40} 46}
41 47
@@ -339,12 +345,6 @@ getProfile(localStorage.accessToken, function (error) {
339 if (error) return console.error(error); 345 if (error) return console.error(error);
340 346
341 loadDirectory(window.location.hash.slice(1)); 347 loadDirectory(window.location.hash.slice(1));
342
343 superagent.get('/api/settings').query({ access_token: localStorage.accessToken }).end(function (error, result) {
344 if (error) console.error(error);
345
346 app.folderListingEnabled = !!result.body.folderListingEnabled;
347 });
348}); 348});
349 349
350$(window).on('hashchange', function () { 350$(window).on('hashchange', function () {