UnofficialCrusaderPatch / UCP3-GUI

Dev work on the UCP3 gui
GNU Affero General Public License v3.0
1 stars 0 forks source link

Bug on main branch: first time use doesn't work, likely because of order of operations issue #275

Open gynt opened 1 week ago

gynt commented 1 week ago

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);

gynt commented 2 days 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!