mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(view): automatically refresh view only if a number is set.
This commit is contained in:
@@ -458,7 +458,7 @@
|
||||
|
||||
// Restart the refresh timer, if needed
|
||||
var refreshViewCheck = AddressBook.$Preferences.defaults.SOGoRefreshViewCheck;
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually') {
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually' && !isNaN(refreshViewCheck)) {
|
||||
var f = angular.bind(this, AddressBook.prototype.$reload);
|
||||
AddressBook.$refreshTimeout = AddressBook.$timeout(f, refreshViewCheck.timeInterval()*1000);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
});
|
||||
});
|
||||
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually') {
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually' && !isNaN(refreshViewCheck)) {
|
||||
if (Account.$refreshUnseenCount)
|
||||
Account.$timeout.cancel(Account.$refreshUnseenCount);
|
||||
Account.$refreshUnseenCount = Account.$timeout(angular.bind(this, Account.refreshUnseenCount, folders), refreshViewCheck.timeInterval()*1000);
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
// Restart the refresh timer, if needed
|
||||
if (!Mailbox.$virtualMode) {
|
||||
var refreshViewCheck = Mailbox.$Preferences.defaults.SOGoRefreshViewCheck;
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually') {
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually' && !isNaN(refreshViewCheck)) {
|
||||
var f = angular.bind(this, Mailbox.prototype.$filter, null, filters);
|
||||
Mailbox.$refreshTimeout = Mailbox.$timeout(f, refreshViewCheck.timeInterval()*1000);
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
}
|
||||
}).finally(function () {
|
||||
var refreshViewCheck = _this.defaults.SOGoRefreshViewCheck;
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually')
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually' && !isNaN(refreshViewCheck))
|
||||
_this.nextInboxPoll = Preferences.$timeout(angular.bind(_this, _this.pollInbox), refreshViewCheck.timeInterval()*1000);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
// Restart the refresh timer, if needed
|
||||
var refreshViewCheck = Component.$Preferences.defaults.SOGoRefreshViewCheck;
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually') {
|
||||
if (refreshViewCheck && refreshViewCheck != 'manually' && !isNaN(refreshViewCheck)) {
|
||||
var f = angular.bind(Component.$rootScope, Component.$rootScope.$emit, 'calendars:list');
|
||||
Component.$refreshTimeout = Component.$timeout(f, refreshViewCheck.timeInterval()*1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user