Merge branch 'main' into feature/usb

This commit is contained in:
just-stuff-tm
2026-03-06 20:31:05 -05:00
52 changed files with 3703 additions and 398 deletions
+4
View File
@@ -80,6 +80,10 @@ class AppSettingsService extends ChangeNotifier {
await updateSettings(_settings.copyWith(mapShowMarkers: value));
}
Future<void> setMapShowGuessedLocations(bool value) async {
await updateSettings(_settings.copyWith(mapShowGuessedLocations: value));
}
Future<void> setEnableMessageTracing(bool value) async {
await updateSettings(_settings.copyWith(enableMessageTracing: value));
}
+2 -4
View File
@@ -172,8 +172,6 @@ class BleDebugLogService extends ChangeNotifier {
return 'CMD_GET_CHANNEL';
case cmdSetChannel:
return 'CMD_SET_CHANNEL';
case cmdGetRadioSettings:
return 'CMD_GET_RADIO_SETTINGS';
case cmdSetCustomVar:
return 'CMD_SET_CUSTOM_VAR';
case cmdSendTracePath:
@@ -215,8 +213,8 @@ class BleDebugLogService extends ChangeNotifier {
return 'RESP_CODE_CHANNEL_MSG_RECV_V3';
case respCodeChannelInfo:
return 'RESP_CODE_CHANNEL_INFO';
case respCodeRadioSettings:
return 'RESP_CODE_RADIO_SETTINGS';
case respCodeAutoAddConfig:
return 'RESP_CODE_AUTO_ADD_CONFIG';
case pushCodeTraceData:
return 'PUSH_CODE_TRACE_DATA';
default:
+7
View File
@@ -15,6 +15,9 @@ class PathHistoryService extends ChangeNotifier {
final List<String> _cacheAccessOrder = [];
static const int _maxHistoryEntries = 100;
int _version = 0;
int get version => _version;
static const int _autoRotationTopCount = 3;
PathHistoryService(this._storage);
@@ -185,6 +188,7 @@ class PathHistoryService extends ChangeNotifier {
) {
var history = _cache[contactPubKeyHex];
if (history == null) return;
_version++;
final existing = _findPathRecord(contactPubKeyHex, pathBytes);
if (existing != null) {
@@ -241,6 +245,7 @@ class PathHistoryService extends ChangeNotifier {
_cache[contactPubKeyHex] = loaded;
_trackAccess(contactPubKeyHex);
_evictIfNeeded();
_version++;
notifyListeners();
}
});
@@ -276,6 +281,7 @@ class PathHistoryService extends ChangeNotifier {
_autoRotationIndex.remove(contactPubKeyHex);
_floodStats.remove(contactPubKeyHex);
await _storage.clearPathHistory(contactPubKeyHex);
_version++;
notifyListeners();
}
@@ -295,6 +301,7 @@ class PathHistoryService extends ChangeNotifier {
);
await _storage.savePathHistory(contactPubKeyHex, _cache[contactPubKeyHex]!);
_version++;
notifyListeners();
}