refactor(core): remove simple snapchat

Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>
This commit is contained in:
rhunk
2025-08-01 15:59:10 +02:00
parent 4e60b01dd0
commit 93358d97f4
3 changed files with 2 additions and 16 deletions

View File

@@ -466,10 +466,6 @@
"home_tab": {
"name": "Home Tab",
"description": "Overrides the startup tab when opening Snapchat"
},
"simple_snapchat":{
"name": "Simple Snapchat",
"description": "Enables a simplified version of Snapchat"
}
}
},
@@ -1273,10 +1269,6 @@
"discover": "Discover",
"spotlight": "Spotlight"
},
"simple_snapchat": {
"always_enabled": "Always Enabled",
"always_disabled": "Always Disabled"
},
"add_friend_source_spoof": {
"added_by_username": "By Username",
"added_by_mention": "By Mention",

View File

@@ -13,7 +13,6 @@ class UserInterfaceTweaks : ConfigContainer() {
val appAppearance = unique("app_appearance", "always_light", "always_dark") { requireRestart() }
val homeTab = unique("home_tab", *tabs) { addNotices(FeatureNotice.UNSTABLE); requireRestart() }
val simpleSnapchat = unique("simple_snapchat", "always_enabled", "always_disabled") { addNotices(FeatureNotice.UNSTABLE); requireRestart() }
}
inner class FriendFeedMessagePreview : ConfigContainer(hasGlobalState = true) {

View File

@@ -31,22 +31,17 @@ class ClientBootstrapOverride: Feature("ClientBootstrapOverride") {
}
val homeTab = bootstrapOverrideConfig.homeTab.getNullable()
val simpleSnapchat = bootstrapOverrideConfig.simpleSnapchat.getNullable()
if (homeTab != null || simpleSnapchat != null) {
if (homeTab != null) {
val plusFileBytes = plusFile.exists().let { if (it) plusFile.readBytes() else ProtoWriter().toByteArray() }
plusFile.writeBytes(
ProtoEditor(plusFileBytes).apply {
edit {
homeTab?.let { currentTab ->
homeTab.let { currentTab ->
remove(1)
addVarInt(1, UserInterfaceTweaks.BootstrapOverride.tabs.indexOf(currentTab) + 1)
}
simpleSnapchat?.let { simpleSnapchat ->
remove(2)
addVarInt(2, if (simpleSnapchat == "always_enabled") 1 else 0)
}
}
}.toByteArray()
)