Floogen / Stardrop

Stardrop is an open-source, cross-platform mod manager for the game Stardew Valley.
https://floogen.gitbook.io/stardrop/
GNU General Public License v3.0
114 stars 31 forks source link

Save changes only on demand #148

Closed Adda0 closed 8 months ago

Adda0 commented 8 months ago

First part of reworked #146. This PR disables automatic refresh of mod list and update of the user profile after any enable mod checkbox is clicked. Now, the changes made by the user are saved after clicking a new save changes button, starting SMAPI, or manually updating the profile from the dropdown menu.

Adding multiple mods through AddMods() refreshes the mod list only after all mods are installed, that is, at the end of the function, and not after every mod.

A button to save changes which updates the profile, refreshes the mod list, etc. has been added. It is also automatically run when starting SMAPI, as it already was previously. For this reason, when a user clicks the checkbox, nothing happens until they click either run SMAPI, save changes, or click one of the menu save/update something options.

If this is an undesirable design approach in your eyes, a settings option "Save changes manually" with tooltip description "Do not save changes until changes are confirmed." or something similar can be added, too.

Translations for other languages need to be added. Tested on Linux, not tested on Windows and MacOS.

Floogen commented 8 months ago

Merged!

I have made a few changes to this pull request, such as adding a config option for this behavior (labeled Automatically Save Profile Changes). I also moved the Save Profile button next to the Save Configs button and made the new save button only appear when changes have been made.

Adda0 commented 8 months ago

All great changes. And they seem to work well. Thanks for the improvements.