feat: suspend location updates

This commit is contained in:
rhunk
2023-12-20 23:45:12 +01:00
parent 47e9a0e0b1
commit cc94ea93b2
5 changed files with 68 additions and 1 deletions

View File

@ -453,6 +453,10 @@
}
}
},
"suspend_location_updates": {
"name": "Suspend Location Updates",
"description": "Adds a button in map settings to suspend location updates"
},
"snapchat_plus": {
"name": "Snapchat Plus",
"description": "Enables Snapchat Plus features\nSome Server-sided features may not work"
@ -1030,5 +1034,9 @@
"streaks_reminder": {
"notification_title": "Streaks",
"notification_text": "You will lose your Streak with {friend} in {hoursLeft} hours"
},
"suspend_location_updates": {
"switch_text": "Suspend Location Updates"
}
}

View File

@ -8,7 +8,8 @@ enum class BridgeFileType(val value: Int, val fileName: String, val displayName:
CONFIG(0, "config.json", "Config"),
MAPPINGS(1, "mappings.json", "Mappings"),
MESSAGE_LOGGER_DATABASE(2, "message_logger.db", "Message Logger",true),
PINNED_CONVERSATIONS(3, "pinned_conversations.txt", "Pinned Conversations");
PINNED_CONVERSATIONS(3, "pinned_conversations.txt", "Pinned Conversations"),
SUSPEND_LOCATION_STATE(4, "suspend_location_state.txt", "Suspend Location State");
fun resolve(context: Context): File = if (isDatabase) {
context.getDatabasePath(fileName)

View File

@ -8,6 +8,7 @@ class Global : ConfigContainer() {
val coordinates = mapCoordinates("coordinates", 0.0 to 0.0) { requireRestart()} // lat, long
}
val spoofLocation = container("spoofLocation", SpoofLocation())
val suspendLocationUpdates = boolean("suspend_location_updates") { requireRestart() }
val snapchatPlus = boolean("snapchat_plus") { requireRestart() }
val disableConfirmationDialogs = multiple("disable_confirmation_dialogs", "remove_friend", "block_friend", "ignore_friend", "hide_friend", "hide_conversation", "clear_conversation") { requireRestart() }
val disableMetrics = boolean("disable_metrics")