Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
feat(YouTube - Change start page): Add more start pages
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Feb 8, 2024
1 parent f43b71b commit 27421fb
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -12,6 +12,10 @@ public static void changeIntent(final Intent intent) {
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);
}
}

0 comments on commit 27421fb

Please sign in to comment.