fix(settings): force custom-source toggles off when legacy example.com URL present
Old installs that once enabled the custom TLE/transceiver toggles kept the legacy "https://example.com/tle.txt" placeholder in preferences. Under the new "toggle replaces the online-update default source" semantics this pointed the All/SatNOGS fetch at a dead URL and broke satellite updates after upgrading to 4.4.8. Migration in getDataSourcesSettings(): example.com placeholders are replaced by the real default URLs (Celestrak All / SatNOGS) and the toggles are forced OFF unless a non-default, real user URL is set. Also disable the reset (loop) icon buttons while their toggle is off. Verified: core:data tests pass, settings + app compile. Version stays 4.4.8 (覆盖 per user).
This commit is contained in:
1 parent
50233cadc1
commit
9a4ceddcb0
2 files changed
+22
-8
No files matched your search
+8
-2
@@ -208,7 +208,10 @@ fun DataSourcesDialog(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
enabled = isEnabledCustomTle.value,
|
||||
trailingIcon = {
|
||||
IconButton(onClick = { urlTle.value = Sources.defaultTleUrl }) {
|
||||
IconButton(
|
||||
onClick = { urlTle.value = Sources.defaultTleUrl },
|
||||
enabled = isEnabledCustomTle.value
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_reset),
|
||||
contentDescription = stringResource(id = R.string.prefs_data_reset_url)
|
||||
@@ -245,7 +248,10 @@ fun DataSourcesDialog(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
enabled = isEnabledCustomTransceivers.value,
|
||||
trailingIcon = {
|
||||
IconButton(onClick = { urlTransceivers.value = Sources.defaultTransceiversUrl }) {
|
||||
IconButton(
|
||||
onClick = { urlTransceivers.value = Sources.defaultTransceiversUrl },
|
||||
enabled = isEnabledCustomTransceivers.value
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_reset),
|
||||
contentDescription = stringResource(id = R.string.prefs_data_reset_url)
|
||||
|
||||
Reference in new issue
Block a user