mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-05 12:07:25 +00:00
feat: remember per-satellite doppler offset in calculator
Store the last entered offset (kHz) per satellite in SharedPreferences via SettingsRepo, and restore it when the linear transponder calculator is shown for that satellite. Follows the project's MVI/clean architecture: - ISettingsRepo: getSatelliteOffset / setSatelliteOffset - SettingsRepo: backed by SharedPreferences - RadarState: calculatorOffsetKHz field - RadarAction: ChangeCalculatorOffset - RadarViewModel: loads offset on SelectTransmitter, saves on change - CalculatorPage/DopplerFrequencyCalculator: receive offset via params instead of accessing SharedPreferences directly from the UI layer.
This commit is contained in:
1 parent
8b5960282f
commit
4aada90b76
8 files changed
+70
-6
No files matched your search
+5
@@ -75,4 +75,9 @@ interface ISettingsRepo {
|
||||
val radioControlSettings: StateFlow<RadioControlSettings>
|
||||
fun updateRadioControlSettings(settings: RadioControlSettings)
|
||||
//endregion
|
||||
|
||||
//region # Per-satellite calculator offset settings
|
||||
fun getSatelliteOffset(catnum: Int): String
|
||||
fun setSatelliteOffset(catnum: Int, offset: String)
|
||||
//endregion
|
||||
}
|
||||
Reference in new issue
Block a user