aleene / FoodViewer

An app to view and edit Open Food Fact products
Apache License 2.0
10 stars 5 forks source link

Synchronize allergens #161

Open aleene opened 8 years ago

aleene commented 8 years ago

If an allergen is deleted in the taxonomy, it should also be removed in the preferences file.

aleene commented 8 years ago

When should I do this? And where? This is only necessary when I update the Allergens.plist file in the bundle.

AllergenWarningDefaults.init() seems the logical place. Is only done once at each startup.

aleene commented 8 years ago

If a preference does not have a corresponding translation, then I assume there is now an error and I reinitialize the preferences from an edited allergenWarnigs array.

aleene commented 8 years ago

Not sure if I do the right thing now. There is a difference between translation not available and item not available.

aleene commented 6 years ago

Seems not a big issue, as long as I do not update the allergens file.

Is only needed to make the app nicer.