revanced-manager icon indicating copy to clipboard operation
revanced-manager copied to clipboard

feat: Pre-release patches toggle

Open kitadai31 opened this issue 3 months ago β€’ 8 comments

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

kitadai31 avatar Mar 25 '24 07:03 kitadai31

Why limit it to alternative sources?

You can pass ?dev=true to achieve the same with the ReVanced API

Ushie avatar Mar 25 '24 11:03 Ushie

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.

oSumAtrIX avatar Mar 25 '24 12:03 oSumAtrIX

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

kitadai31 avatar Mar 25 '24 17:03 kitadai31

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?

brian6932 avatar Apr 16 '24 21:04 brian6932

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?

Can you share the apk here please

nivranaitsirhc avatar Apr 20 '24 10:04 nivranaitsirhc

@nivranaitsirhc sure [redacted]

brian6932 avatar Apr 20 '24 11:04 brian6932

@nivranaitsirhc sure [redacted]

It works like a charm! Thanks!

Screenshot_20240420-191932_ReVanced Manager Debug.png

Screenshot_20240420-191959_ReVanced Manager Debug.png

Screenshot_20240420-193744_ReVanced Manager Debug.png

Screenshot_20240420-194113_YouTube.png

nivranaitsirhc avatar Apr 20 '24 11:04 nivranaitsirhc

Waiting for the parameter issue in ReVanced API to be fixed

I have some questions

  1. 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 ?
  2. I added a word "(dev)" in settings description because ReVanced calls pre-release versions β€œdev”. (40b1589) Is this no problem?

kitadai31 avatar May 14 '24 09:05 kitadai31