Sanmill
Sanmill copied to clipboard
Store different default rules for special country and region
Getting special country and region values is essentially to configure different default settings for different countries, mainly rule settings.
My idea is to establish a mapping relationship between special countries and regions and default values and store them in the map. I don’t know if it’s better to save to local data storage?
You could extend the normal Settings
object with SpecialSettings
and then use the new calss as a default.
I think inheritance is the way to go with that.
After your refactoring, it is more convenient to realize this function!