-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(Tumblr): Use a common filter patch #3018
Conversation
src/main/kotlin/app/revanced/patches/tumblr/timelinefilter/TimelineFilterPatch.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/tumblr/ads/DisableDashboardAds.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/tumblr/timelinefilter/TimelineFilterPatch.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/tumblr/timelinefilter/TimelineFilterPatch.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/tumblr/timelinefilter/TimelineFilterPatch.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/tumblr/timelinefilter/TimelineFilterPatch.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/tumblr/timelinefilter/TimelineFilterPatch.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/tumblr/timelinefilter/TimelineFilterPatch.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oSumAtrIX The refactor in your latest commit (oops, looks like I accidentally made a general review instead of against the lines I had selected) does not work. The two added instructions used different registers (p1 / p2) because the argument we need is in different positions in the two fingerprinted methods.
@leumasme Instead of an array you can map the fingerprints to the correct register and then use it in the forEach loop. |
Made it work again and updated the injection method as requested. Should be ready to merge (together with the integrations pr). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oSumAtrIX This PR does not work anymore with the changes you added before merging. It currently fails both in apply-patch stage and in app-launch stage.
src/main/kotlin/app/revanced/patches/tumblr/timelinefilter/TimelineFilterPatch.kt
Show resolved
Hide resolved
…Save sound to playlist` buttons (ReVanced#3018)
# [4.7.0-dev.6](ReVanced/revanced-patches@v4.7.0-dev.5...v4.7.0-dev.6) (2024-04-12) ### Features * **YouTube - Hide Shorts components:** Hide `Shop`, `Location` and `Save sound to playlist` buttons ([ReVanced#3018](ReVanced/revanced-patches#3018)) ([5210ac4](ReVanced/revanced-patches@5210ac4))
# [4.7.0](ReVanced/revanced-patches@v4.6.0...v4.7.0) (2024-04-21) ### Bug Fixes * **Tumblr - Fix old versions:** Improve reliability by removing remnances of Tumblr Live ([#2988](ReVanced/revanced-patches#2988)) ([897b4db](ReVanced/revanced-patches@897b4db)) * **YouTube - GmsCore support:** Prompt to disable battery optimizations, if not done already ([#2958](ReVanced/revanced-patches#2958)) ([82acb84](ReVanced/revanced-patches@82acb84)) * **YouTube - Hide ads:** rename `Hide paid content` to `Hide paid promotion label` ([#3026](ReVanced/revanced-patches#3026)) ([17e4ac9](ReVanced/revanced-patches@17e4ac9)) * **YouTube - Hide load more button:** Include patch with `Hide layout components`, and hide button only in search feed ([#2959](ReVanced/revanced-patches#2959)) ([b007e8e](ReVanced/revanced-patches@b007e8e)) * **YouTube - Hide Shorts components:** Correctly hide Shorts if navigation tab is changed using device back button ([#3007](ReVanced/revanced-patches#3007)) ([e5848e9](ReVanced/revanced-patches@e5848e9)) * **YouTube - Player flyout menu:** Add hide Lock screen menu ([#2985](ReVanced/revanced-patches#2985)) ([308de4a](ReVanced/revanced-patches@308de4a)) * **YouTube - Spoof device dimensions:** Warn about potential performance issues ([ReVanced#3039](ReVanced/revanced-patches#3039)) ([9d6f305](ReVanced/revanced-patches@9d6f305)) * **YouTube Music - Remove upgrade button:** Fix compatibility with latest versions ([#3045](ReVanced/revanced-patches#3045)) ([80de996](ReVanced/revanced-patches@80de996)) ### Features * Add `Hex` patch ([#3034](ReVanced/revanced-patches#3034)) ([3c95aac](ReVanced/revanced-patches@3c95aac)) * **Amazon:** Add `Always allow deep-linking` patch ([#3000](ReVanced/revanced-patches#3000)) ([a92b7fb](ReVanced/revanced-patches@a92b7fb)) * **Strava - Unlock subscription:** Remove compatible version constraint ([80a5599](ReVanced/revanced-patches@80a5599)) * **Twitter:** Add `Sanitize sharing links` patch ([#3003](ReVanced/revanced-patches#3003)) ([186b887](ReVanced/revanced-patches@186b887)) * **YouTube - Hide layout components:** Add option to hide horizontal shelves ([ReVanced#2951](ReVanced/revanced-patches#2951)) ([9ae0650](ReVanced/revanced-patches@9ae0650)) * **YouTube - Hide layout components:** Hide playables ([8423515](ReVanced/revanced-patches@8423515)) * **YouTube - Hide Shorts components:** Hide `Shop`, `Location` and `Save sound to playlist` buttons ([ReVanced#3018](ReVanced/revanced-patches#3018)) ([5210ac4](ReVanced/revanced-patches@5210ac4)) * **YouTube - Hide Shorts components:** Hide tagged products, hide search suggestions ([#3019](ReVanced/revanced-patches#3019)) ([e0d2fe5](ReVanced/revanced-patches@e0d2fe5)) * **YouTube - Swipe controls:** Save and restore brightness and add auto-brightness toggle ([#2996](ReVanced/revanced-patches#2996)) ([f6c3bc4](ReVanced/revanced-patches@f6c3bc4)) * **YouTube:** Add 'About' preference to settings menu ([#2981](ReVanced/revanced-patches#2981)) ([5abf894](ReVanced/revanced-patches@5abf894)) * **YouTube:** Match overlay icons style to YouTube ([ReVanced#3023](ReVanced/revanced-patches#3023)) ([6849393](ReVanced/revanced-patches@6849393)) * **YouTube:** Support version `19.09.38`, `19.10.39` and `19.11.43` ([#2971](ReVanced/revanced-patches#2971)) ([730f3e3](ReVanced/revanced-patches@730f3e3)) * **YT Music - Hide 'Get Music Premium' label:** Remove occurences of label in settings ([#3046](ReVanced/revanced-patches#3046)) ([10e170a](ReVanced/revanced-patches@10e170a))
Depends on ReVanced/revanced-integrations#479
Previously, we blocked tumblr timeline objects by replacing their expected "object_type" string that is returned from the api.
This was suboptimal for a few reasons:
This PR adds a Timeline Filter Patch, which
Timeline
andPostsResponse
which are used for the front page and the blog view (clicking on a blog to see only posts from this block) respectively.addObjectTypeFilter(typename: String)
method which injects the equivalent ofif ("$typename".equals(elementType)) iterator.remove()
into the integration filter function.
The two patches
DisableTumblrLivePatch
andDisableDashboardAdsPatch
patch have also been updated to use the new timeline filtering.Additionally, more blocked ad post types were added to
DisableDashboardAds
since some ads were still visibleWait, why are some patch file names suffixed with
Patch
and some are not? I guess I will just leave it like this.