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

Add option to choose which update channel to receive notifications for #704

Merged

Conversation

LostLuma
Copy link
Contributor

Fixes #604 by allowing the user to choose between receiving all updates, betas and releases, or only releases (default).
This branch is based on the work from #679 and I will keep this as a draft until Max's work is merged into the upstream repo.

It'd however be awesome if these two PRs could land in the same release of ModMenu so I do not have to mark the new method in the UpdateInfo interface as being optional (and prob end up not being used a lot).

@LostLuma
Copy link
Contributor Author

LostLuma commented Apr 16, 2024

I just realized earlier that the update checking logic could be a bit smarter if the user can choose a channel, so this has been adjusted.

By making the user's preference for an update channel available to the update checker we can now handle a situation in which the user is on version 1.0.0 for a mod, and both version 1.0.1 and 1.1.0-beta.1 are available. If the preference is to only receive release versions the update checker can return version 1.0.1, otherwise it can return version 1.1.0-beta.1.

I don't think the Modrinth API supports selecting which version types one is looking for in the get latest versions from hashes route, so this can sadly not improve the update checking experience for mods not using a custom update checker. Maybe I'll look into contributing this to the Modrinth API in the future though since it seems very useful to me, also for other API consumers. Turns out the Modrinth API docs just don't include this info ...

@LostLuma LostLuma marked this pull request as ready for review April 16, 2024 19:40
@LostLuma LostLuma changed the base branch from 1.20.2 to 1.20.3 April 18, 2024 15:57
@LostLuma LostLuma force-pushed the feature-update-channel-option branch from 1bc109e to 867e384 Compare April 18, 2024 15:57
@Prospector Prospector merged commit 5eba246 into TerraformersMC:1.20.3 Apr 22, 2024
1 check passed
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.

Update checker prompts to update to Beta and Alpha versions
2 participants