Gps toggle in settings#433
Conversation
translations
- Updated _RepeaterStatusScreenState to load status after the first frame to avoid mid-build notifyListeners() calls. - Removed unused _statusRequestedAt variable and adjusted _clockText() to use repeaterClockAtLogin for time display. - Enhanced _SettingsScreenState with a GPS toggle switch that updates custom variables for GPS settings. - Cleaned up RepeaterCommandService by removing redundant pending command checks and adjusted command ID generation. - Removed jni plugin from generated_plugins.cmake for both Linux and Windows platforms.
…toggle" This reverts commit e21f310.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc3325ec46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| value: connector.currentCustomVars?['gps'] == '1', | ||
| onChanged: (value) async { | ||
| await connector.setCustomVar(value ? 'gps:1' : 'gps:0'); | ||
| }, |
There was a problem hiding this comment.
Keep the GPS switch state in sync
In the new top-level GPS switch, value is driven entirely by connector.currentCustomVars, but setCustomVar() only sends the frame and starts/stops polling; it does not update currentCustomVars, notify listeners, or refresh the custom vars. When a user toggles GPS here, the switch rebuilds with the old value, so an initially-off switch keeps appearing off and every subsequent tap keeps sending gps:1 rather than allowing the user to turn it back off until some later device-info refresh happens.
Useful? React with 👍 / 👎.
# Conflicts: # lib/l10n/app_bg.arb # lib/l10n/app_de.arb # lib/l10n/app_es.arb # lib/l10n/app_fr.arb # lib/l10n/app_hu.arb # lib/l10n/app_it.arb # lib/l10n/app_ja.arb # lib/l10n/app_ko.arb # lib/l10n/app_localizations_es.dart # lib/l10n/app_localizations_it.dart # lib/l10n/app_localizations_nl.dart # lib/l10n/app_localizations_pt.dart # lib/l10n/app_localizations_sv.dart # lib/l10n/app_localizations_uk.dart # lib/l10n/app_nl.arb # lib/l10n/app_pl.arb # lib/l10n/app_pt.arb # lib/l10n/app_ru.arb # lib/l10n/app_sk.arb # lib/l10n/app_sl.arb # lib/l10n/app_sv.arb # lib/l10n/app_uk.arb # lib/l10n/app_zh.arb
Reflect the set value immediately so UI bound to currentCustomVars (e.g. the GPS toggle in settings) updates on tap rather than waiting for a later device-info refresh.
No description provided.