From 6227a078e4a9fe693dc534fcd84a5d965e7aa04b Mon Sep 17 00:00:00 2001 From: daplugg23 Date: Thu, 5 Feb 2026 20:07:39 -0600 Subject: [PATCH] fix(config): reorder location properties Move locationSearchProvider and googleMapsApiKey properties in Global.kt and en_US.json to be positioned between 'spoofLocation' and 'coordinates'. This ensures they appear in the correct order in any auto-generated feature lists, while maintaining their manual placement in BetterLocationRoot.kt. --- common/src/main/assets/lang/en_US.json | 16 +++++++-------- .../purrfectsnap/common/config/impl/Global.kt | 20 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/common/src/main/assets/lang/en_US.json b/common/src/main/assets/lang/en_US.json index 35cf1f82..f95160ad 100644 --- a/common/src/main/assets/lang/en_US.json +++ b/common/src/main/assets/lang/en_US.json @@ -1634,6 +1634,14 @@ "name": "Spoof Location", "description": "Spoofs your location to a specified one" }, + "location_search_provider": { + "name": "Location Search Provider", + "description": "Choose the provider for searching locations" + }, + "google_maps_api_key": { + "name": "Google Maps API Key", + "description": "Required if using Google Maps provider" + }, "coordinates": { "name": "Coordinates", "description": "Set the coordinates of the spoofed location" @@ -1661,14 +1669,6 @@ "show_battery_level": { "name": "Show Battery Level", "description": "Shows the battery level of your friends on the map" - }, - "location_search_provider": { - "name": "Location Search Provider", - "description": "Choose the provider for searching locations" - }, - "google_maps_api_key": { - "name": "Google Maps API Key", - "description": "Required if using Google Maps provider" } } }, diff --git a/common/src/main/kotlin/me/eternal/purrfectsnap/common/config/impl/Global.kt b/common/src/main/kotlin/me/eternal/purrfectsnap/common/config/impl/Global.kt index 5f89a740..610605ea 100644 --- a/common/src/main/kotlin/me/eternal/purrfectsnap/common/config/impl/Global.kt +++ b/common/src/main/kotlin/me/eternal/purrfectsnap/common/config/impl/Global.kt @@ -20,17 +20,17 @@ class Global : ConfigContainer() { } inner class BetterLocationConfig : ConfigContainer(hasGlobalState = true) { - val spoofLocation = boolean("spoof_location") - val coordinates = mapCoordinates("coordinates", 0.0 to 0.0) { addFlags(ConfigFlag.SENSITIVE) } // lat, long - val walkRadius = string("walk_radius") { requireRestart(); inputCheck = { it.toDoubleOrNull()?.isFinite() == true && it.toDouble() >= 0.0 } } - val alwaysUpdateLocation = boolean("always_update_location") { requireRestart() } - val suspendLocationUpdates = boolean("suspend_location_updates") - val spoofBatteryLevel = string("spoof_battery_level") { requireRestart(); inputCheck = { it.isEmpty() || it.toIntOrNull() in 0..100 } } - val spoofHeadphones = boolean("spoof_headphones") { requireRestart() } - val showBatteryLevel = boolean("show_battery_level") { requireRestart() } + val spoofLocation = boolean("spoof_location") val locationSearchProvider = unique("location_search_provider", "osm", "google_maps") { addFlags(ConfigFlag.NO_DISABLE_KEY) } - val googleMapsApiKey = string("google_maps_api_key") { addFlags(ConfigFlag.SENSITIVE) } - } + val googleMapsApiKey = string("google_maps_api_key") { addFlags(ConfigFlag.SENSITIVE) } + val coordinates = mapCoordinates("coordinates", 0.0 to 0.0) { addFlags(ConfigFlag.SENSITIVE) } // lat, long + val walkRadius = string("walk_radius") { requireRestart(); inputCheck = { it.toDoubleOrNull()?.isFinite() == true && it.toDouble() >= 0.0 } } + val alwaysUpdateLocation = boolean("always_update_location") { requireRestart() } + val suspendLocationUpdates = boolean("suspend_location_updates") + val spoofBatteryLevel = string("spoof_battery_level") { requireRestart(); inputCheck = { it.isEmpty() || it.toIntOrNull() in 0..100 } } + val spoofHeadphones = boolean("spoof_headphones") { requireRestart() } + val showBatteryLevel = boolean("show_battery_level") { requireRestart() } + } inner class MediaUploadQualityConfig : ConfigContainer() { val forceVideoUploadSourceQuality = boolean("force_video_upload_source_quality") { requireRestart() }