mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-07 10:35: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;
|
package app.revanced.integrations.youtube.patches;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
import app.revanced.integrations.youtube.settings.Settings;
|
|
||||||
import app.revanced.integrations.shared.Logger;
|
import app.revanced.integrations.shared.Logger;
|
||||||
|
import app.revanced.integrations.youtube.settings.Settings;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public final class ChangeStartPagePatch {
|
public final class ChangeStartPagePatch {
|
||||||
@ -12,6 +12,10 @@ public final class ChangeStartPagePatch {
|
|||||||
if (startPage.isEmpty()) return;
|
if (startPage.isEmpty()) return;
|
||||||
|
|
||||||
Logger.printDebug(() -> "Changing start page to " + startPage);
|
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