mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Calendar: Only check group once per group
This commit is contained in:
parent
97a874342f
commit
2e833586f7
@ -3751,6 +3751,8 @@ export class CalendarApp extends EgwApp
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _group_query_cache = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pre-fetch the members of any group participants
|
* Pre-fetch the members of any group participants
|
||||||
*
|
*
|
||||||
@ -3791,14 +3793,22 @@ export class CalendarApp extends EgwApp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find missing groups
|
// Find missing groups
|
||||||
if(groups.length)
|
const cache_key = groups.join("_");
|
||||||
|
if(groups.length && typeof this._group_query_cache[cache_key] === "undefined")
|
||||||
{
|
{
|
||||||
return this.egw.request("calendar.calendar_owner_etemplate_widget.ajax_owner", [groups]).then((data) =>
|
this._group_query_cache[cache_key] = this.egw.request("calendar.calendar_owner_etemplate_widget.ajax_owner", [groups]).then((data) =>
|
||||||
{
|
{
|
||||||
options = options.concat(Object.values(data));
|
options = options.concat(Object.values(data));
|
||||||
option_owner.select_options = options;
|
option_owner.select_options = options;
|
||||||
|
}).finally(() =>
|
||||||
|
{
|
||||||
|
delete this._group_query_cache[cache_key];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if(typeof this._group_query_cache[cache_key] !== "undefined")
|
||||||
|
{
|
||||||
|
return this._group_query_cache[cache_key];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user