mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 18:31:26 +01:00
Return null instead of resolved promise to avoid extra calls
This commit is contained in:
parent
c504de5def
commit
97a874342f
@ -3759,9 +3759,9 @@ export class CalendarApp extends EgwApp
|
|||||||
* in a particular calendar.
|
* in a particular calendar.
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event
|
||||||
* @return Promise
|
* @return Promise| null
|
||||||
*/
|
*/
|
||||||
async _fetch_group_members(event) : Promise<any>
|
async _fetch_group_members(event) : Promise<any> | null
|
||||||
{
|
{
|
||||||
let groups = [];
|
let groups = [];
|
||||||
let option_owner = null;
|
let option_owner = null;
|
||||||
@ -3801,7 +3801,7 @@ export class CalendarApp extends EgwApp
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return Promise.resolve();
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,7 +384,12 @@ export class et2_calendar_daycol extends et2_valueWidget implements et2_IDetache
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
waitForGroups.push(((<CalendarApp>this.getInstanceManager().app_obj.calendar)._fetch_group_members(event)).then(() =>
|
let wait = (<CalendarApp>this.getInstanceManager().app_obj.calendar)._fetch_group_members(event);
|
||||||
|
if(wait === null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
waitForGroups.push(wait.then(() =>
|
||||||
{
|
{
|
||||||
if(event && event.date && et2_calendar_event.owner_check(event, this) && (
|
if(event && event.date && et2_calendar_event.owner_check(event, this) && (
|
||||||
event.date === this.options.date ||
|
event.date === this.options.date ||
|
||||||
|
@ -1921,8 +1921,11 @@ export class et2_calendar_planner extends et2_calendar_view implements et2_IDeta
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
let wait = (<CalendarApp>app.calendar)._fetch_group_members(event.data);
|
||||||
waitForGroups.push((<CalendarApp>app.calendar)._fetch_group_members(event.data));
|
if(wait !== null)
|
||||||
|
{
|
||||||
|
waitForGroups.push(wait);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(waitForGroups.length == 0)
|
if(waitForGroups.length == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user