Open gynt opened 1 week ago
Thinking about this a little bit, I think there is the solution to separate the extensions state update from the configuration update. What I currently wrote is that the "setExtensionsState" triggers an update to the configuration and defaults atoms that the UI elements make use of.
I am not 100% sure if the order of operations should always be: set extensions state, update default and configuration atoms Or, also the reverse.
In case of the activateFirstTimeUse we want to emulate the user activating two extensions and then saving the config. So the update configuration and defaults should be simultaneously with the extensions being activated.
Hmmmm, maybe it is time to deprecate the defaults atom and merge it into extensions state, maybe that will make things more intuitive!
Needs a careful think of how the first time use logic should work. Maybe the load logic needs to build the configuration db, and that should do the trick? See
newerExtensionState = activateFirstTimeUseExtensions(newExtensionsState);