mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-05 17:45:49 +01:00
feat(YouTube - Change start page): Add more start pages
This commit is contained in:
parent
f43b71be45
commit
27421fb578
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user