mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-17 14:20:49 +10:00
Refactor repeater status screen and settings screen; add GPS toggle
- 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.
This commit is contained in:
@@ -305,6 +305,18 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () => _editLocation(context, connector),
|
||||
),
|
||||
if (connector.currentCustomVars?.containsKey('gps') ?? false) ...[
|
||||
const Divider(height: 1),
|
||||
SwitchListTile(
|
||||
secondary: const Icon(Icons.gps_fixed),
|
||||
title: Text(l10n.settings_locationGPSEnable),
|
||||
subtitle: Text(l10n.settings_locationGPSEnableSubtitle),
|
||||
value: connector.currentCustomVars?['gps'] == '1',
|
||||
onChanged: (value) async {
|
||||
await connector.setCustomVar(value ? 'gps:1' : 'gps:0');
|
||||
},
|
||||
),
|
||||
],
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.group_add_outlined),
|
||||
|
||||
Reference in New Issue
Block a user