Compare commits

...

4 Commits

Author SHA1 Message Date
semantic-release-bot
7e4e48bc9f chore: Release v5.26.0-dev.7 [skip ci]
# [5.26.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v5.26.0-dev.6...v5.26.0-dev.7) (2025-06-04)

### Features

* **YouTube - Hide Shorts components:** Add option to hide comment panel ([#5102](https://github.com/ReVanced/revanced-patches/issues/5102)) ([e435b33](e435b33593))
2025-06-04 07:09:39 +00:00
LisoUseInAIKyrios
e435b33593 feat(YouTube - Hide Shorts components): Add option to hide comment panel (#5102) 2025-06-04 09:06:27 +02:00
semantic-release-bot
bf288b83ae chore: Release v5.26.0-dev.6 [skip ci]
# [5.26.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v5.26.0-dev.5...v5.26.0-dev.6) (2025-06-03)

### Features

* **Sync for Reddit:** Add `Fix post thumbnails` patch ([7a53580](7a53580380))
2025-06-03 19:50:57 +00:00
kolpazar
7a53580380 feat(Sync for Reddit): Add Fix post thumbnails patch 2025-06-03 21:48:24 +02:00
10 changed files with 75 additions and 5 deletions

View File

@@ -1,3 +1,17 @@
# [5.26.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v5.26.0-dev.6...v5.26.0-dev.7) (2025-06-04)
### Features
* **YouTube - Hide Shorts components:** Add option to hide comment panel ([#5102](https://github.com/ReVanced/revanced-patches/issues/5102)) ([22b9bee](https://github.com/ReVanced/revanced-patches/commit/22b9beedd3243a8d6a5635f591b91cdcf307be37))
# [5.26.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v5.26.0-dev.5...v5.26.0-dev.6) (2025-06-03)
### Features
* **Sync for Reddit:** Add `Fix post thumbnails` patch ([e1ec30c](https://github.com/ReVanced/revanced-patches/commit/e1ec30c5b07560a39d7b8ab293b0c1f39fd59ef2))
# [5.26.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.26.0-dev.4...v5.26.0-dev.5) (2025-06-03)

View File

@@ -153,14 +153,12 @@ public class ReturnYouTubeDislikePatch {
}
if (Utils.containsAny(conversionContextString,
"|shorts_dislike_button.eml", "|reel_dislike_button.eml"
)) {
"|shorts_dislike_button.eml", "|reel_dislike_button.eml")) {
return getShortsSpan(original, true);
}
if (Utils.containsAny(conversionContextString,
"|shorts_like_button.eml", "|reel_like_button.eml"
)) {
"|shorts_like_button.eml", "|reel_like_button.eml")) {
if (!Utils.containsNumber(original)) {
Logger.printDebug(() -> "Replacing hidden likes count");
return getShortsSpan(original, false);

View File

@@ -217,6 +217,12 @@ public final class ShortsFilter extends Filter {
// Suggested actions.
//
suggestedActionsGroupList.addAll(
new ByteArrayFilterGroup(
Settings.HIDE_SHORTS_COMMENT_PANEL,
// Preview comment that can popup while a Short is playing.
// Uses no bundled icons, and instead the users profile photo is shown.
"shorts-comments-panel"
),
new ByteArrayFilterGroup(
Settings.HIDE_SHORTS_SHOP_BUTTON,
"yt_outline_bag_"

View File

@@ -275,6 +275,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_SHORTS_SEARCH = new BooleanSetting("revanced_hide_shorts_search", FALSE);
public static final BooleanSetting HIDE_SHORTS_SEARCH_SUGGESTIONS = new BooleanSetting("revanced_hide_shorts_search_suggestions", TRUE);
public static final BooleanSetting HIDE_SHORTS_SHARE_BUTTON = new BooleanSetting("revanced_hide_shorts_share_button", FALSE);
public static final BooleanSetting HIDE_SHORTS_COMMENT_PANEL = new BooleanSetting("revanced_hide_shorts_comment_panel", TRUE);
public static final BooleanSetting HIDE_SHORTS_SHOP_BUTTON = new BooleanSetting("revanced_hide_shorts_shop_button", TRUE);
public static final BooleanSetting HIDE_SHORTS_SOUND_BUTTON = new BooleanSetting("revanced_hide_shorts_sound_button", FALSE);
public static final BooleanSetting HIDE_SHORTS_SOUND_METADATA_LABEL = new BooleanSetting("revanced_hide_shorts_sound_metadata_label", FALSE);

View File

@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
org.gradle.parallel = true
android.useAndroidX = true
kotlin.code.style = official
version = 5.26.0-dev.5
version = 5.26.0-dev.7

View File

@@ -575,6 +575,10 @@ public final class app/revanced/patches/reddit/customclients/sync/syncforreddit/
public static final fun getFixSLinksPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/thumbnail/FixPostThumbnailsPatchKt {
public static final fun getFixPostThumbnailsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/user/UseUserEndpointPatchKt {
public static final fun getUseUserEndpointPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}

View File

@@ -0,0 +1,12 @@
package app.revanced.patches.reddit.customclients.sync.syncforreddit.fix.thumbnail
import app.revanced.patcher.fingerprint
import com.android.tools.smali.dexlib2.AccessFlags
internal val customImageViewLoadFingerprint = fingerprint {
accessFlags(AccessFlags.PUBLIC)
parameters("Ljava/lang/String;", "Z", "Z", "I", "I")
custom { _, classDef ->
classDef.endsWith("CustomImageView;")
}
}

View File

@@ -0,0 +1,31 @@
package app.revanced.patches.reddit.customclients.sync.syncforreddit.fix.thumbnail
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.bytecodePatch
@Suppress("unused")
val fixPostThumbnailsPatch = bytecodePatch(
name = "Fix post thumbnails",
description = "Fixes loading post thumbnails by correcting their URLs.",
) {
compatibleWith(
"com.laurencedawson.reddit_sync",
"com.laurencedawson.reddit_sync.pro",
"com.laurencedawson.reddit_sync.dev"
)
// Image URLs contain escaped ampersands (&), let's replace these with unescaped ones (&).
execute {
customImageViewLoadFingerprint.method.addInstructions(
0,
"""
# url = url.replace("&", "&");
const-string v0, "&"
const-string v1, "&"
invoke-virtual { p1, v0, v1 }, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object p1
"""
)
}
}

View File

@@ -90,6 +90,7 @@ private val hideShortsComponentsResourcePatch = resourcePatch {
SwitchPreference("revanced_hide_shorts_paused_overlay_buttons"),
// Suggested actions.
SwitchPreference("revanced_hide_shorts_comment_panel"),
SwitchPreference("revanced_hide_shorts_save_sound_button"),
SwitchPreference("revanced_hide_shorts_use_template_button"),
SwitchPreference("revanced_hide_shorts_upcoming_button"),

View File

@@ -812,6 +812,9 @@ To show the Audio track menu, change \'Spoof video streams\' to iOS TV"</string>
<string name="revanced_hide_shorts_location_label_title">Hide location label</string>
<string name="revanced_hide_shorts_location_label_summary_on">Location label is hidden</string>
<string name="revanced_hide_shorts_location_label_summary_off">Location label is shown</string>
<string name="revanced_hide_shorts_comment_panel_title">Hide Comment panel</string>
<string name="revanced_hide_shorts_comment_panel_summary_on">Comment panel is hidden</string>
<string name="revanced_hide_shorts_comment_panel_summary_off">Comment panel is shown</string>
<string name="revanced_hide_shorts_save_sound_button_title">Hide Save music button</string>
<string name="revanced_hide_shorts_save_sound_button_summary_on">Save music button is hidden</string>
<string name="revanced_hide_shorts_save_sound_button_summary_off">Save music button is shown</string>