Expose user's settings and defaults inline

This improves performance by removing two AJAX calls and a lot of
JavaScript promises.
This commit is contained in:
Francis Lachapelle committed 2017-06-01 13:48:45 -04:00
1 parent 1fa056bb25
commit 89bfa0c536
22 files changed
+441 -484

No files matched your search

@@ -102,11 +102,9 @@
else
list.splice(sibling, 0, calendar);
this.$Preferences.ready().then(function() {
if (Calendar.$Preferences.settings.Calendar.FoldersOrder)
// Save list order
Calendar.saveFoldersOrder(_.flatMap(Calendar.$findAll(), 'id'));
});
if (Calendar.$Preferences.settings.Calendar.FoldersOrder)
// Save list order
Calendar.saveFoldersOrder(_.flatMap(Calendar.$findAll(), 'id'));
// Refresh list of calendars to fetch links associated to new calendar
Calendar.$reloadAll();
};