fix(mail(js)): don't poll server from popup windows

This commit is contained in:
Francis Lachapelle
2021-11-24 10:41:02 -05:00
parent a08c4c9f47
commit 11eb6c29d4
@@ -50,14 +50,16 @@
// Listen to HTTP errors broadcasted from HTTP interceptor
$rootScope.$on('http:Error', onHttpError);
if (sgSettings.activeUser('path').calendar) {
// Fetch Calendar alarms
Preferences.getAlarms();
}
if (!isPopup) {
if (sgSettings.activeUser('path').calendar) {
// Fetch Calendar alarms
Preferences.getAlarms();
}
if (sgSettings.activeUser('path').mail) {
// Poll inbox for new messages
Preferences.pollInbox();
if (sgSettings.activeUser('path').mail) {
// Poll inbox for new messages
Preferences.pollInbox();
}
}
};