From 55b4b28f29077175553fa88bec6ef63f466877ae Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 13 Jan 2022 13:48:18 -0700 Subject: [PATCH] Calendar: Make sure projectmanager integration (filter) refreshes actual data faster, fix events don't come back when turning integration (filter) off --- calendar/js/app.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/calendar/js/app.ts b/calendar/js/app.ts index 3271453d5c..6374db3d46 100644 --- a/calendar/js/app.ts +++ b/calendar/js/app.ts @@ -887,6 +887,29 @@ export class CalendarApp extends EgwApp // Clear any events from that app this._clear_cache(app); } + if(action.id == "integration_projectmanager" && + this.egw.preference("calendar_integration","projectmanager").indexOf("#") == 0) + { + if(!action.checked) + { + // Still need to re-fetch in this case, clearing won't bring the others back + callback = function() + { + this._fetch_data(this.state); + }.bind(this); + } + else + { + // Clear all events, we're filtering real events now + callback = function() + { + this._clear_cache(); + + // Force redraw to current state + this.setState({state: this.state}); + }.bind(this); + } + } if(typeof callback === "undefined") { callback = function() {};