Skip to content

Commit

Permalink
feat(Twitter): Added Remove Todays news patch
Browse files Browse the repository at this point in the history
  • Loading branch information
swakwork committed Jan 22, 2025
1 parent aa7acc5 commit 8324633
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package crimera.patches.twitter.ads.timelineEntryHook

import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import crimera.patches.twitter.misc.settings.SettingsPatch
import crimera.patches.twitter.misc.settings.fingerprints.SettingsStatusLoadFingerprint

@Patch(
name = "Remove \"Today's News\"",
dependencies = [SettingsPatch::class, TimelineEntryHookPatch::class],
compatiblePackages = [CompatiblePackage("com.twitter.android")],
use = true,
)
object HideTodaysNews : BytecodePatch(
setOf(SettingsStatusLoadFingerprint),
) {
override fun execute(context: BytecodeContext) {
SettingsStatusLoadFingerprint.enableSettings("hideTodaysNews")
}
}
1 change: 1 addition & 0 deletions src/main/resources/twitter/settings/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<item>@string/piko_pref_pinned_posts_section</item>
<item>@string/piko_pref_hide_detailed_posts</item>
<item>@string/piko_pref_hide_premium_prompt</item>
<item>@string/piko_pref_hide_todays_news</item>
</string-array>

<string-array name="piko_array_reply_sorting">
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/twitter/settings/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<string name="piko_pref_hide_detailed_posts">Detailed posts (in replies)</string>
<string name="piko_pref_hide_trends">Promoted trends</string>
<string name="piko_pref_hide_premium_prompt">Message prompts</string>
<string name="piko_pref_hide_todays_news">Today\'s news</string>
<string name="piko_pref_del_from_db">Delete entries from database</string>
<string name="piko_pref_db_not_found">Database not found</string>
<string name="piko_pref_db_not_open">Database is not opened</string>
Expand Down

0 comments on commit 8324633

Please sign in to comment.