feat(YouTube - Change start page): Add more start pages

This commit is contained in:
oSumAtrIX 2024-02-08 21:10:27 +01:00
parent f43b71be45
commit 27421fb578
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
1 changed files with 7 additions and 3 deletions

View File

@ -1,9 +1,9 @@
package app.revanced.integrations.youtube.patches;
import android.content.Intent;
import app.revanced.integrations.youtube.settings.Settings;
import android.net.Uri;
import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.youtube.settings.Settings;
@SuppressWarnings("unused")
public final class ChangeStartPagePatch {
@ -12,6 +12,10 @@ public final class ChangeStartPagePatch {
if (startPage.isEmpty()) return;
Logger.printDebug(() -> "Changing start page to " + startPage);
intent.setAction("com.google.android.youtube.action." + startPage);
if (startPage.startsWith("www"))
intent.setData(Uri.parse(startPage));
else
intent.setAction("com.google.android.youtube.action." + startPage);
}
}