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
Add option to disable mod update check #1170
base: develop
Are you sure you want to change the base?
Conversation
Add do_updates bool in metadata and check the bool before adding mod to mods list Signed-off-by: ErogigGit <erogigabyte@gmail.com>
add button to mod menu for inverting the do_updates boolean in metadata Signed-off-by: ErogigGit <erogigabyte@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR!
indeed, not having an indicator for this option is a big problem. Though, I think this can be solved by adding another column in ModFolderModel
, relating to this setting. similar to the leftmost one, though i'm not sure whether it'll work or not. I can give it a try if i find some time to, but not sure when that'll be, so feel free to try it yourself (but i think we shouldn't merge this PR without at least some sort of visual indicator)
another issue is that these configurations are not saved in disk, so they are forgotten when we close the launcher. not sure if we want them to be saved, but considering all other things you do in that page are saved, having this one thing not be seems a bit weird.
Co-authored-by: flow <flowlnlnln@gmail.com> Signed-off-by: ErogigGit <89475886+ErogigGit@users.noreply.github.com>
Co-authored-by: flow <flowlnlnln@gmail.com> Signed-off-by: ErogigGit <89475886+ErogigGit@users.noreply.github.com>
Signed-off-by: ErogigGit <erogigabyte@gmail.com>
Signed-off-by: ErogigGit <erogigabyte@gmail.com>
Not currently connected to the bool and will always display "⭳" Signed-off-by: ErogigGit <erogigabyte@gmail.com>
currently sorts based on the new column by default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing that particularly sticks out is that the text on the sidebar for disabling the check is quite big, so the sidebar keeps growing and shrinking when moving the selection, which is quite annoying.
also, idk if you're using the debug build, but having assertions enabled triggers the one in https://github.com/PolyMC/PolyMC/blob/develop/launcher/minecraft/mod/ResourceFolderModel.cpp#L479, because you didn't change the sorting keys in the ModFolderModel
s constructor. For that, the best solution would be to add a new sorting key in Resource.h
, and add the sorting logic for it in Mod.cpp
, probably similar to the logic from the ENABLED sort key in Resource.cpp
. The comments in Resource.h
and ResourceFolderModel.h
may help a great deal!
Signed-off-by: ErogigGit <erogigabyte@gmail.com>
Signed-off-by: ErogigGit <erogigabyte@gmail.com>
I'm unsure how to go about saving the boolean. The only ideas I can think of are eighter a text file or changing the filenames of the mods and I'm wondering if there are better ways of doing this. If this isn't saved when the program is shut down, then I don't see the point of adding this. |
I agree, if this reset all the time, it would be useless. I think a text file makes much more sense then renaming the mod file. Also, (I've heard) some mods break of their name is changed. |
in the original packwiz specification, a mod is not be automatically updated if its metadata doesn't contain an we could, however, just add a boolean for this as another field in the metadata file itself, and treat it as selected for the check if the mod doesn't have metadata. While it's not in the original specification, other tools that use the same packwiz format ought to just ignore the field we add there, so it shouldn't cause any major problems. Maybe saving the boolean in a field inside the this way, you can keep most of what you've already done here! (sorry for the wait in responding) |
Signed-off-by: ErogigGit <erogigabyte@gmail.com>
…ogig-Polymc-Fork into disable-mod-updates
Signed-off-by: ErogigGit <erogigabyte@gmail.com>
…ogig-Polymc-Fork into disable-mod-updates
Still needs some slight changes |
i can't seem to be able to disable update checking for mods without metadata, which kinda breaks the point of it, or at least limits an important use case of it |
Signed-off-by: ErogigGit <erogigabyte@gmail.com>
Signed-off-by: ErogigGit <erogigabyte@gmail.com>
closes #1135 (mostly)
Works using a bool which I added to the metadata of mods called do_updates.
Adds a button beneath "Check for Updates" which disables the update check for the selected mod. The button simply inverts the do_updates bool which can be weird if several mods are selected. Because of this, there is no good way of setting all mods to be updated upon update checks.
The problem above is worsened because I can't figure out how to add an indicator for this setting like #1135 mentioned.
Despite all this the function does technically work although would need a lot of improvement in the future.