Fix review findings, add default flood scope, and address recent issues
Review fixes: - Keep stored message history beyond the 200-message window; stop messages leaking between radios; reset link/session state on disconnect - Accept firmware's 176-byte RX frames over USB/TCP - Hold APP_START during contact sync; contact-sync watchdog; replay DMs from not-yet-known senders; tombstone late command replies; finish channel sync on ERR_NOT_FOUND; fail region-scoped sends cleanly - DM retry watchdog when RESP_CODE_SENT never arrives; late repeater CLI replies; ACK hash collisions; UTF-8-safe name truncation - Image pipeline: delete-during-decode, lifecycle cancels, decoder memory release, entry cap, dead worker recovery, atomic model writes - Storage: deterministic reaction hash across web/native, Smaz double-decode, per-entry parsing, per-radio path history and regions, review-mode data isolation - UI: safe channel slot selection, byte-length name limits, double-send guard, mounted checks, localized hardcoded strings - Skip persisted-store reload on repeat SELF_INFO Features: - Radio default flood scope (firmware ver 11+) and explicit unscoped sends (ver 12+) - Scan for nearby nodes (#570) - Optional distinct first-hop repeater counting for channel resend (#589) - Optional region next to hop count (#580) Issues: - Message text follows system font size (#569) - Repeater/room password field accepts 20 chars (#576) - TCP auto-reconnect and keepalive (#571) - Order feeds by local receive time; flag future timestamps (#584) - Coding rate help text (#568), French "Favoris" (#575) - iOS/macOS app badge now clears Translations for all new strings in every locale.
This commit is contained in:
1 parent
a64a33d0c0
commit
25f197c979
120 files changed
+10424
-687
No files matched your search
@@ -92,6 +92,7 @@ class _RepeaterSettingsScreenState extends State<RepeaterSettingsScreen> {
|
||||
bool _isLoading = false;
|
||||
bool _hasChanges = false;
|
||||
final Set<_SettingField> _dirtyFields = {};
|
||||
final Set<_SettingField> _editedDuringSave = {};
|
||||
bool _refreshingBasic = false;
|
||||
bool _refreshingRadio = false;
|
||||
bool _refreshingTxPower = false;
|
||||
@@ -826,6 +827,61 @@ class _RepeaterSettingsScreenState extends State<RepeaterSettingsScreen> {
|
||||
retainDirty.add(field);
|
||||
}
|
||||
|
||||
// Fields whose edits this save attempts. Anything edited while the
|
||||
// commands are in flight stays dirty afterwards (see _markChanged).
|
||||
final savingFields = Set<_SettingField>.of(_dirtyFields);
|
||||
_editedDuringSave.clear();
|
||||
|
||||
// A changed text field that was emptied has nothing to send; report it
|
||||
// instead of silently skipping it and claiming the save succeeded.
|
||||
void requireText(
|
||||
_SettingField field,
|
||||
TextEditingController controller,
|
||||
String label,
|
||||
) {
|
||||
if (_dirtyFields.contains(field) && controller.text.trim().isEmpty) {
|
||||
reject(field, l10n.repeater_valueRequired(label));
|
||||
}
|
||||
}
|
||||
|
||||
requireText(
|
||||
_SettingField.name,
|
||||
_nameController,
|
||||
l10n.repeater_repeaterName,
|
||||
);
|
||||
requireText(
|
||||
_SettingField.radio,
|
||||
_freqController,
|
||||
l10n.repeater_frequencyMhz,
|
||||
);
|
||||
requireText(
|
||||
_SettingField.txPower,
|
||||
_txPowerController,
|
||||
l10n.repeater_txPower,
|
||||
);
|
||||
requireText(_SettingField.lat, _latController, l10n.repeater_latitude);
|
||||
requireText(_SettingField.lon, _lonController, l10n.repeater_longitude);
|
||||
requireText(
|
||||
_SettingField.prvKey,
|
||||
_prvKeyController,
|
||||
l10n.repeater_prvKey,
|
||||
);
|
||||
requireText(
|
||||
_SettingField.txDelay,
|
||||
_txDelayController,
|
||||
l10n.repeater_txDelay,
|
||||
);
|
||||
requireText(
|
||||
_SettingField.directTxDelay,
|
||||
_directTxDelayController,
|
||||
l10n.repeater_directTxDelay,
|
||||
);
|
||||
requireText(
|
||||
_SettingField.intThresh,
|
||||
_intThreshController,
|
||||
l10n.repeater_intThresh,
|
||||
);
|
||||
|
||||
if (_dirtyFields.contains(_SettingField.name) &&
|
||||
_nameController.text.isNotEmpty) {
|
||||
pending.add((
|
||||
@@ -1098,9 +1154,13 @@ class _RepeaterSettingsScreenState extends State<RepeaterSettingsScreen> {
|
||||
}
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
// Only drop fields that were actually sent successfully; keep failed
|
||||
// ones and anything edited while the save was running.
|
||||
_dirtyFields
|
||||
..clear()
|
||||
..addAll(retainDirty);
|
||||
..removeAll(savingFields)
|
||||
..addAll(retainDirty)
|
||||
..addAll(_editedDuringSave);
|
||||
_editedDuringSave.clear();
|
||||
_hasChanges = _dirtyFields.isNotEmpty || passwordsFailed;
|
||||
});
|
||||
|
||||
@@ -1144,6 +1204,7 @@ class _RepeaterSettingsScreenState extends State<RepeaterSettingsScreen> {
|
||||
|
||||
void _markChanged(_SettingField field) {
|
||||
_dirtyFields.add(field);
|
||||
if (_isLoading) _editedDuringSave.add(field);
|
||||
_flagHasChanges();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user