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

bug: default settings don't update on updates

Open Ushie opened this issue 2 years ago • 6 comments

Type

Error while running the manager

Bug description

If a default setting, like the default API URL changes in an update, installing the new update doesn't update it

Steps to reproduce

  1. Install ReVanced Manager v1.6.1 (clean install)
  2. Check the API URL, it should be releases.revanced.app
  3. Update to ReVanced Manager v1.9.4 from https://revanced.app/download (in-app updates are broken due to releases.revanced.app not functioning)
  4. Check the API URL, it should be api.revanced.app but instead it's releases.revanced.app

Acknowledgments

  • [X] I have searched the existing issues; this is new and no duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I properly filled out all of the requested information in this issue.
  • [X] The issue is solely related to ReVanced Manager and not caused by patches.

Ushie avatar Sep 01 '23 15:09 Ushie

If we decide what the API should be, then why are we even allowing the users to modify it? If we remove the ability to modify it, then we can control it via updates.

TheAabedKhan avatar Sep 01 '23 16:09 TheAabedKhan

then why are we even allowing the users to modify it?

Because the entirety of ReVanced is built in a way that is independent of us, a few extra settings go a long way

Ushie avatar Sep 01 '23 16:09 Ushie

OK. So, updating the settings only if they are set to default, right?

TheAabedKhan avatar Sep 01 '23 16:09 TheAabedKhan

Yes

Ushie avatar Nov 17 '23 13:11 Ushie

Essentially, the API URL should be a global variable in the app, and the default value of the API URL should use that variable instead of duplicate it, if API URL is equal to the variable after transformation, it should stay a reference to the variable when applying changes

Ushie avatar Nov 17 '23 13:11 Ushie

A migration function has been introduced. Does this suffice?

oSumAtrIX avatar Feb 26 '24 00:02 oSumAtrIX

🍜 This issue should been resolved by the release of v1.19.0

validcube avatar Mar 05 '24 02:03 validcube