Merge pull request #4 from imCrest/imCrest/add-customizable-purchase-date-feature-di5qqb
Add Snapchat Plus purchase date setting and chat-hold kill actions (UI + core)
This commit is contained in:
@@ -1240,6 +1240,10 @@
|
||||
"name": "Settings Menu",
|
||||
"description": "Choose between the new and legacy settings menu layouts"
|
||||
},
|
||||
"chat_hold_kill_actions": {
|
||||
"name": "PurrfectSnap Chat Hold Kill",
|
||||
"description": "Hold the chat/settings header button to kill selected app(s). Leave all options off to disable."
|
||||
},
|
||||
"spoof_snap_score": {
|
||||
"name": "Spoof Snap Score",
|
||||
"description": "Spoof your Snap Score (local only)",
|
||||
@@ -1919,6 +1923,10 @@
|
||||
"name": "Snapchat Plus",
|
||||
"description": "Enables Snapchat Plus features\nSome Server-sided features may not work"
|
||||
},
|
||||
"snapchat_plus_purchase_date": {
|
||||
"name": "Snapchat Plus Purchase Date",
|
||||
"description": "Tap Save to choose a date from calendar (leave empty to use default)"
|
||||
},
|
||||
"media_upload_quality": {
|
||||
"name": "Media Upload Quality",
|
||||
"description": "Overrides the media upload quality",
|
||||
@@ -2905,6 +2913,10 @@
|
||||
"default": "Default",
|
||||
"legacy": "Legacy"
|
||||
},
|
||||
"chat_hold_kill_actions": {
|
||||
"kill_snapchat": "Kill Snapchat",
|
||||
"kill_purrfectsnap": "Kill PurrfectSnap"
|
||||
},
|
||||
"path_format": {
|
||||
"create_author_folder": "Create folder for each author",
|
||||
"create_source_folder": "Create folder for each media source type",
|
||||
@@ -3623,6 +3635,7 @@
|
||||
"cancel": "Cancel",
|
||||
"copy": "Copy",
|
||||
"save": "Save",
|
||||
"set": "Set",
|
||||
"open": "Open",
|
||||
"download": "Download",
|
||||
"import": "Import",
|
||||
|
||||
@@ -3,6 +3,8 @@ package me.eternal.purrfectsnap.common.config.impl
|
||||
import me.eternal.purrfectsnap.common.config.ConfigContainer
|
||||
import me.eternal.purrfectsnap.common.config.ConfigFlag
|
||||
import me.eternal.purrfectsnap.common.config.FeatureNotice
|
||||
import java.time.LocalDate
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
class Global : ConfigContainer() {
|
||||
companion object {
|
||||
@@ -46,6 +48,12 @@ class Global : ConfigContainer() {
|
||||
|
||||
val betterLocation = container("better_location", BetterLocationConfig())
|
||||
val snapchatPlus = unique("snapchat_plus", "not_subscribed", "basic", "ad_free") { requireRestart() }
|
||||
val snapchatPlusPurchaseDate = string("snapchat_plus_purchase_date", "") {
|
||||
requireRestart()
|
||||
inputCheck = {
|
||||
it.isBlank() || runCatching { LocalDate.parse(it, DateTimeFormatter.ISO_LOCAL_DATE) }.isSuccess
|
||||
}
|
||||
}
|
||||
val mediaUploadQualityConfig = container("media_upload_quality", MediaUploadQualityConfig())
|
||||
val performanceMode = container("performance_mode", PerformanceModeConfig()) { requireRestart() }.apply {
|
||||
profile.set("max")
|
||||
|
||||
@@ -63,6 +63,7 @@ class UserInterfaceTweaks : ConfigContainer() {
|
||||
}
|
||||
val preventForcedKeyboard = boolean("prevent_forced_keyboard") { requireRestart() }
|
||||
val settingsMenu = unique("settings_menu", "default", "legacy") { requireRestart() }.apply { set("default") }
|
||||
val chatHoldKillActions = multiple("chat_hold_kill_actions", "kill_snapchat", "kill_purrfectsnap") { requireRestart() }
|
||||
|
||||
inner class SpoofSnapScore : ConfigContainer(hasGlobalState = true) {
|
||||
val customSnapScore = string("custom_snap_score") {
|
||||
|
||||
Reference in New Issue
Block a user