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
+12 -4
View File
@@ -25,6 +25,14 @@ class RepeaterCommandService {
Function(int)? onAttempt,
int retries = maxRetries,
}) async {
final repeaterKey = repeater.publicKeyHex;
final hasPending = _pendingCommands.keys.any(
(id) => id.startsWith(repeaterKey),
);
if (hasPending) {
throw Exception('Another command is still awaiting a response.');
}
final attemptCount = retries < 1 ? 1 : retries;
final selection = await _connector.preparePathForContactSend(repeater);
@@ -54,14 +62,14 @@ class RepeaterCommandService {
int attempt,
) async {
final repeaterKey = repeater.publicKeyHex;
final prefix = _nextPrefixToken();
final commandId = '${repeaterKey}_$prefix';
final commandId = '${repeaterKey}_${DateTime.now().millisecondsSinceEpoch}';
final completer = Completer<String>();
_pendingCommands[commandId] = completer;
_commandPrefixes[commandId] = prefix;
_pendingByPrefix[prefix] = commandId;
try {
final prefix = _nextPrefixToken();
_commandPrefixes[commandId] = prefix;
_pendingByPrefix[prefix] = commandId;
final framedCommand = '$prefix$command';
final pathLengthValue = selection.useFlood ? -1 : selection.hopCount;
final timestampSeconds = DateTime.now().millisecondsSinceEpoch ~/ 1000;