1
mirror of https://github.com/revanced/revanced-integrations synced 2024-11-22 05:02:19 +01:00

feat(youtube): remove patch open-links-directly

The patch did not serve any real purpose

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
oSumAtrIX 2023-02-22 16:22:04 +01:00
parent ccb5d81d46
commit dce882b128
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -1,25 +0,0 @@
package app.revanced.integrations.patches;
import android.net.Uri;
import app.revanced.integrations.settings.SettingsEnum;
public class OpenLinksDirectlyPatch {
private static final String YOUTUBE_REDIRECT_PATH = "redirect";
/**
* Parses the given YouTube redirect uri by extracting the redirect query.
*
* @param uri The YouTube redirect uri.
* @return The redirect query.
*/
public static Uri parseRedirectUri(String uri) {
if (SettingsEnum.OPEN_LINKS_DIRECTLY.getBoolean()) {
final var parsed = Uri.parse(uri);
if (parsed.getPath().equals(YOUTUBE_REDIRECT_PATH))
Uri.parse(parsed.getQueryParameter("q"));
}
return Uri.parse(uri);
}
}