Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make UninstallModModal more self-sustained #1247

Merged
merged 6 commits into from
Mar 28, 2024
Merged

Conversation

anttimaki
Copy link
Collaborator

No description provided.

There's no need to pass dependants list as a prop since it can be as
easily be determined internally.

Dependency list prop was dropped altogether since it's not used.
While the mod itself would be enough to determine the state without a
separate boolean value, I decided to use both to stay consistent with
the other modals handled by ModalsModule store.
The implementation imitates what's currently being done by
LocalModList.performUninstallMod().

This helps remove business logic and direct references to providers
from components, hopefully supporting reuse and easier refactoring.
The modal now handles uninstalling of mods entirely internally.
LocalModCard now uninstalls mods without dependants internally, and
delegates mods with dependants to UninstallModModal, effectively
cutting out the middleman LocalModList.
@anttimaki anttimaki merged commit 3d6e614 into develop Mar 28, 2024
7 checks passed
@anttimaki anttimaki deleted the uninstall-mod-modal branch March 28, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant