perf(calendar(web)): initiate Web calendars reload from the frontend

The Web calendars subsciptions marked to be reloaded on login are no
longer reloaded from the backend; the sync operation is now activated
from the frontend in XHR calls to avoid blocking the Web interface.

Fixes #4939
This commit is contained in:
Francis Lachapelle
2021-10-06 14:16:48 -04:00
parent ef64c13410
commit f017c42608
3 changed files with 61 additions and 13 deletions
+8
View File
@@ -1567,6 +1567,14 @@ static NSArray *reminderValues = nil;
if ((v = [o objectForKey: @"settings"]))
{
// Remove ReloadWebCalendars if necessary
NSMutableDictionary *calendarModule = [o objectForKey: @"Calendar"];
if (calendarModule && [calendarModule objectForKey: @"ReloadWebCalendars"] == nil)
{
calendarModule = [[user userSettings] objectForKey: @"Calendar"];
[calendarModule removeObjectForKey: @"ReloadWebCalendars"];
}
[[[user userSettings] source] setValues: v];
[[user userSettings] synchronize];
}