Revert "Refactor repeater status screen and settings screen; add GPS toggle"

This reverts commit e21f3106d0.
This commit is contained in:
zjs81
2026-05-08 13:24:22 -07:00
parent e21f3106d0
commit a92e57bb64
45 changed files with 1410 additions and 13194 deletions
+7 -11
View File
@@ -38,6 +38,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
StreamSubscription<Uint8List>? _frameSubscription;
RepeaterCommandService? _commandService;
Timer? _statusTimeout;
DateTime? _statusRequestedAt;
int? _batteryMv;
int? _uptimeSecs;
int? _queueLen;
@@ -63,11 +64,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
final connector = Provider.of<MeshCoreConnector>(context, listen: false);
_commandService = RepeaterCommandService(connector);
_setupMessageListener();
// Defer until after the first frame so any notifyListeners() triggered
// during preparePathForContactSend doesn't fire mid-build.
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) _loadStatus();
});
_loadStatus();
}
@override
@@ -267,6 +264,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
setState(() {
_isLoading = true;
_statusRequestedAt = DateTime.now();
_pendingStatusSelection = null;
_batteryMv = null;
_uptimeSecs = null;
@@ -641,13 +639,11 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
}
String _clockText() {
final connector = Provider.of<MeshCoreConnector>(context, listen: false);
final dt = connector.repeaterClockAtLogin(widget.repeater.publicKey);
if (dt == null) return '';
final local = dt.toLocal();
final date = '${local.day}/${local.month}/${local.year}';
if (_statusRequestedAt == null) return '';
final dt = _statusRequestedAt!;
final date = '${dt.day}/${dt.month}/${dt.year}';
final time =
'${local.hour.toString().padLeft(2, '0')}:${local.minute.toString().padLeft(2, '0')}';
'${dt.hour.toString().padLeft(2, '0')}:${dt.minute.toString().padLeft(2, '0')}';
return '$date $time';
}