Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(YouTube): Add
Change start page
patch
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
app/src/main/java/app/revanced/integrations/patches/ChangeStartPagePatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package app.revanced.integrations.patches; | ||
|
||
import android.content.Intent; | ||
import app.revanced.integrations.settings.SettingsEnum; | ||
import app.revanced.integrations.utils.LogHelper; | ||
|
||
@SuppressWarnings("unused") | ||
public final class ChangeStartPagePatch { | ||
public static void changeIntent(Intent intent) { | ||
final var startPage = SettingsEnum.START_PAGE.getString(); | ||
if (startPage.isEmpty()) return; | ||
|
||
LogHelper.printDebug(() -> "Changing start page to " + startPage); | ||
intent.setAction("com.google.android.youtube.action." + startPage); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters