mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 00:45:09 +00:00
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:
@@ -32,9 +32,7 @@
|
||||
params: []
|
||||
};
|
||||
|
||||
Preferences.ready().then(function() {
|
||||
vm.showSubscribedOnly = Preferences.defaults.SOGoMailShowSubscribedFoldersOnly;
|
||||
});
|
||||
this.showSubscribedOnly = Preferences.defaults.SOGoMailShowSubscribedFoldersOnly;
|
||||
|
||||
this.refreshUnseenCount();
|
||||
|
||||
@@ -258,7 +256,7 @@
|
||||
}; // delegate
|
||||
|
||||
this.refreshUnseenCount = function() {
|
||||
var unseenCountFolders = $window.unseenCountFolders;
|
||||
var unseenCountFolders = $window.unseenCountFolders, refreshViewCheck;
|
||||
|
||||
_.forEach(vm.accounts, function(account) {
|
||||
|
||||
@@ -282,11 +280,9 @@
|
||||
});
|
||||
});
|
||||
|
||||
Preferences.ready().then(function() {
|
||||
var refreshViewCheck = Preferences.defaults.SOGoRefreshViewCheck;
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually')
|
||||
$timeout(vm.refreshUnseenCount, refreshViewCheck.timeInterval()*1000);
|
||||
});
|
||||
refreshViewCheck = Preferences.defaults.SOGoRefreshViewCheck;
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually')
|
||||
$timeout(vm.refreshUnseenCount, refreshViewCheck.timeInterval()*1000);
|
||||
};
|
||||
|
||||
this.isDroppableFolder = function(srcFolder, dstFolder) {
|
||||
|
||||
Reference in New Issue
Block a user