revanced-manager
revanced-manager copied to clipboard
feat: Pre-release patches toggle
Add a toggle for pre-release patches to the alternative source settings. Closes: #821
This PR also fixes an problem where pre-release Integrations are being used when using alternate sources.
At this time, Patches are referring GitHubAPI#getLatestPatchesRelease()
that doesn't include pre-releases, but Integrations are referring GitHubAPI#getLatestRelease()
that includes pre-releases.
This problem actually caused patched apps to crash recently in crimera/piko patches (an alternative source) when they released a pre-releases.
(Actually, this is the main motivation)
getLatestReleaseFile()
in github_api.dart
was removed because it's unused
Why limit it to alternative sources?
You can pass ?dev=true to achieve the same with the ReVanced API
Are changelogs/updates considered as well?
@Ushie I am not sure but are queries ignored by cache on CloudFlare? Because then, using the dev query has no effect.
I already tried ?dev=true at ReVanced API, but it didn't effect. https://api.revanced.app/v2/revanced-patches/releases/latest?dev=true So, I thought it wasn't implemented yet. That's why I limited to GitHub API only. I didn't know the cache issue.
If the cache issue will be fixed, I think I should wait for it.
Are changelogs/updates considered as well?
Yes. These lines change the data source of patches update dialog according to the settings. https://github.com/ReVanced/revanced-manager/blob/e88e997436d8692023d49480089fe7d71538492b/lib/ui/views/home/home_viewmodel.dart#L482-L490
One thing I noticed after building this branch (rebased) was that checking for Revanced Manager
updates gets stuck on Loading...
, patches work fine though. Is that just a quirk of debug builds, or an issue with the PR?
One thing I noticed after building this branch (rebased) was that checking for
Revanced Manager
updates gets stuck onLoading...
, patches work fine though. Is that just a quirk of debug builds, or an issue with the PR?
Can you share the apk here please
@nivranaitsirhc sure [redacted]
@nivranaitsirhc sure [redacted]
It works like a charm! Thanks!
Waiting for the parameter issue in ReVanced API to be fixed
I have some questions
- I added the ReVanced API v2 related logic in revanced_api.dart, but should I split the file into two files like
revanced_api_v2.dart
? - I added a word "(dev)" in settings description because ReVanced calls pre-release versions βdevβ. (40b1589) Is this no problem?