Cleaned up SharedPreferences keys and values

This commit is contained in:
Arty Bishop committed 2025-12-27 15:01:45 +00:00
1 parent e100484810
commit b9ade5f243
14 files changed
+239 -326

No files matched your search

@@ -1,12 +1,12 @@
package com.rtbishop.look4sat.domain.model
data class DatabaseState(val entriesTotal: Int, val radiosTotal: Int, val timestamp: Long)
data class DatabaseState(val numberOfRadios: Int, val numberOfSatellites: Int, val updateTimestamp: Long)
data class PassesSettings(val hoursAhead: Int, val minElevation: Double)
data class PassesSettings(val filterHoursAhead: Int, val filterMinElevation: Double)
data class OtherSettings(
val utcState: Boolean,
val updateState: Boolean,
val sweepState: Boolean,
val sensorState: Boolean
val stateOfAutoUpdate: Boolean,
val stateOfSensors: Boolean,
val stateOfSweep: Boolean,
val stateOfUtc: Boolean
)
@@ -56,93 +56,54 @@ interface ISettingsRepo {
"X-Comm" to "https://celestrak.org/NORAD/elements/gp.php?GROUP=x-comm&FORMAT=csv"
)
//region # Station position settings
val stationPosition: StateFlow<GeoPos>
fun setGpsPosition(): Boolean
fun setGeoPosition(latitude: Double, longitude: Double, altitude: Double = 0.0): Boolean
fun setQthPosition(locator: String): Boolean
//endregion
//region # Database update settings
val databaseState: StateFlow<DatabaseState>
fun saveDatabaseState(state: DatabaseState)
fun saveSatType(type: String, catnums: List<Int>)
fun loadSatType(type: String): List<Int>
//endregion
//region # Entries selection settings
val satelliteSelection: StateFlow<List<Int>>
fun saveEntriesSelection(catnums: List<Int>)
//region # Satellites selection settings
val selectedIds: StateFlow<List<Int>>
fun setSelectedIds(ids: List<Int>)
//endregion
//region # Passes filter settings
val passesSettings: StateFlow<PassesSettings>
fun getSelectedModes(): List<String>
fun setSelectedModes(modes: List<String>)
fun updatePassesSettings(settings: PassesSettings)
//endregion
fun savePassesSettings(settings: PassesSettings)
fun saveModesSelection(modes: List<String>)
fun loadModesSelection(): List<String>
//region # Station position settings
val stationPosition: StateFlow<GeoPos>
fun setStationPositionGeo(latitude: Double, longitude: Double, altitude: Double): Boolean
fun setStationPositionGps(): Boolean
fun setStationPositionQth(locator: String): Boolean
//endregion
//region # Database update settings
val databaseState: StateFlow<DatabaseState>
fun getSatelliteTypeIds(type: String): List<Int>
fun setSatelliteTypeIds(type: String, ids: List<Int>)
fun updateDatabaseState(state: DatabaseState)
//endregion
//region # Other settings
val otherSettings: StateFlow<OtherSettings>
fun toggleUtc(value: Boolean)
fun toggleUpdate(value: Boolean)
fun toggleSweep(value: Boolean)
fun toggleSensor(value: Boolean)
fun setStateOfAutoUpdate(value: Boolean)
fun setStateOfSensors(value: Boolean)
fun setStateOfSweep(value: Boolean)
fun setStateOfUtc(value: Boolean)
//endregion
//region # Undefined settings
fun getRotatorEnabled(): Boolean
fun setRotatorEnabled(value: Boolean)
fun getRotatorServer(): String
fun setRotatorServer(value: String)
fun getBluetoothAddress(): String
fun setBluetoothAddress(value: String)
fun getBluetoothFormat(): String
fun setBluetoothFormat(value: String)
fun getBluetoothName(): String
fun setBluetoothName(value: String)
fun getBluetoothState(): Boolean
fun setBluetoothState(value: Boolean)
fun getRotatorAddress(): String
fun setRotatorAddress(value: String)
fun getRotatorPort(): String
fun setRotatorPort(value: String)
fun getBTEnabled(): Boolean
fun setBTEnabled(value: Boolean)
fun getBTDeviceAddr(): String
fun setBTDeviceAddr(value: String)
fun getBTDeviceName(): String
fun setBTDeviceName(value: String)
fun getBTFormat(): String
fun setBTFormat(value: String)
fun getRotatorState(): Boolean
fun setRotatorState(value: Boolean)
//endregion
}