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

Reset Vuex state when returning to game selection to free up memory #1385

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

VilppeRiskidev
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@anttimaki anttimaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what "start resetting" in the PR title refers to, but yes, this looks like a good beginning of what I had in mind. However, if you check the ticket, my original idea was to call a reset method on the main/index store, and let it handle resetting the substores. Is there a reason why this now directly calls reset on profile substore? Are you planning adding the resets of the other stores in this PR or a separate one?

@VilppeRiskidev VilppeRiskidev force-pushed the reset-profile-data-on-game-selection-screen branch from 1dafecf to fc95df9 Compare July 19, 2024 09:29
@VilppeRiskidev VilppeRiskidev force-pushed the reset-profile-data-on-game-selection-screen branch 2 times, most recently from bd9342e to 5aa8b0e Compare September 5, 2024 12:36
Copy link
Collaborator

@anttimaki anttimaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes shouldn't break remembering the last selected profile.

src/pages/Profiles.vue Outdated Show resolved Hide resolved
@VilppeRiskidev VilppeRiskidev force-pushed the reset-profile-data-on-game-selection-screen branch from 5aa8b0e to 03e2f40 Compare September 11, 2024 09:02
@anttimaki
Copy link
Collaborator

I'll approve this PR when #1410 is approved.

@VilppeRiskidev VilppeRiskidev force-pushed the reset-profile-data-on-game-selection-screen branch from 03e2f40 to 762be48 Compare September 16, 2024 11:17
VilppeRiskidev and others added 5 commits September 16, 2024 14:34
There was still a bug where returning to profile selections screen and
then moving back to manager screen with the same profile (without
changing the active profile in between) displayed an empty local mod
list.

Also if the TsModsModule can't be reset here, it somewhat waters down
the another half of the purpose of these changes, which was to free up
memory when it's not needed. The things that would have gotten reset
are very small compared to the large mod lists.

Full resetting is still done if the active game is changed.
Add data resetting to vuex storage modules and use the functionality in page components
Copy link
Collaborator

@anttimaki anttimaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though approved, I'll delay merging this for now since we want to keep the "release pipeline" clear. This should be squash-merged when the time comes.

@anttimaki anttimaki changed the title Start resetting profile data when GameSelectionScreen is created Reset Vuex state when returning to game selection to free up memory Sep 27, 2024
@anttimaki anttimaki merged commit 96e607a into develop Sep 27, 2024
5 of 7 checks passed
@anttimaki anttimaki deleted the reset-profile-data-on-game-selection-screen branch September 27, 2024 06:15
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.

2 participants