GNOME Bugzilla – Bug 777621
Don't show dairy warning for vegan recipes
Last modified: 2017-01-24 16:22:18 UTC
This might not be a good long-term solution but it works
Created attachment 344001 [details] [review] Don't show dairy warning for vegan recipes Vegan recipes by definition can't contain dairy so we shouldn't show a warning for it even if the milk-free flag isn't set. Another solution would be to set the milk-free flag for all vegan recipes, but the code seems to make the assumption that each recipe has only one diet flag set.
I don't think we should have an assumption like that (only one diet). Where do you see that ?
(In reply to Matthias Clasen from comment #2) > I don't think we should have an assumption like that (only one diet). Where > do you see that ? I thought that was the case based on the switch statement in gr_diet_get_label and elsewhere, but I suppose it's just supposed to return a label for any of the flags that are set rather than all of them.
Yes, that's correct. I'm not super happy with the way the flags have worked out for this, and may replace them with something else at some point
Attachment 344001 [details] pushed as 53c528a - Don't show dairy warning for vegan recipes