Calendar: Make sure we don't accidentally double the integrated app in the list

This commit is contained in:
nathan 2021-12-01 10:25:27 -07:00
parent 0685005f41
commit bff73eb0b6

View File

@ -860,11 +860,15 @@ export class CalendarApp extends EgwApp
integration_preference = jQuery.extend([],integration_preference); integration_preference = jQuery.extend([],integration_preference);
if(action.checked) if(action.checked)
{
if(integration_preference.indexOf(app) === -1)
{ {
integration_preference.push(app); integration_preference.push(app);
}
// After the preference change is done, get new info which should now include the app // After the preference change is done, get new info which should now include the app
callback = callback ? callback : function() { callback = callback ? callback : function()
{
this._fetch_data(this.state); this._fetch_data(this.state);
}.bind(this); }.bind(this);
} }