Skip to content

Commit

Permalink
feat: disable memories snap feed
Browse files Browse the repository at this point in the history
  • Loading branch information
rhunk committed Jan 23, 2024
1 parent 234fe2c commit eb3ea26
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/src/main/assets/lang/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@
"name": "Block Ads",
"description": "Prevents Advertisements from being displayed"
},
"disable_memories_snap_feed": {
"name": "Disable Memories Snap Feed",
"description": "Prevents Snapchat from showing recent memories when you swipe up in camera"
},
"spotlight_comments_username": {
"name": "Spotlight Comments Username",
"description": "Shows author username in Spotlight comments"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Global : ConfigContainer() {
val disableMetrics = boolean("disable_metrics") { requireRestart() }
val disableStorySections = multiple("disable_story_sections", "friends", "following", "discover") { requireRestart(); requireCleanCache() }
val blockAds = boolean("block_ads")
val disableMemoriesSnapFeed = boolean("disable_memories_snap_feed")
val spotlightCommentsUsername = boolean("spotlight_comments_username") { requireRestart() }
val bypassVideoLengthRestriction = unique("bypass_video_length_restriction", "split", "single") { addNotices(
FeatureNotice.BAN_RISK); requireRestart(); nativeHooks() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class ConfigurationOverride : Feature("Configuration Override", loadParams = Fea
arrayOf("CUSTOM_AD_TRACKER_URL", "CUSTOM_AD_INIT_SERVER_URL", "CUSTOM_AD_SERVER_URL", "INIT_PRIMARY_URL", "INIT_SHADOW_URL").forEach {
overrideProperty(it, { context.config.global.blockAds.get() }, { "http://127.0.0.1" })
}
overrideProperty("ENABLE_SNAP_FEED", { context.config.global.disableMemoriesSnapFeed.get() }, { false })

classReference.getAsClass()?.hook(
getProperty.getAsString()!!,
Expand Down

0 comments on commit eb3ea26

Please sign in to comment.