/// <summary> /// Remove a custom filter. This function should be used when your plugin is in the process of being disabled. /// This function should not be used when the filters screen is being shown. /// </summary> /// <param name="customFilter">A filter to remove from the list.</param> public static void RemoveFilterFromList(IFilter customFilter) { if (customFilter == null && !DefaultFilters.Contains(customFilter)) { return; } CurrentFilterList.Remove(customFilter); customFilter.Cleanup(); FilterListChanged?.Invoke(); }