fix: address PR review issues

- Fix memory leak by adding dispose() to remove connection listener
- Fix typo: changedNavgation -> _changedNavigation
- Add mounted check before navigation to prevent errors
- Remove overly aggressive _handleDisconnection() call on battery request failure
- Only reset battery flag on error to allow retry without disconnecting
This commit is contained in:
Zach committed 2026-01-28 21:29:18 -07:00
1 parent 34a6b5d895
commit 92d2b224e7
2 files changed
+24 -12

No files matched your search

+1 -1
View File
@@ -963,7 +963,7 @@ class MeshCoreConnector extends ChangeNotifier {
await sendFrame(buildGetBattAndStorageFrame());
} catch (e) {
// Reset flag on error to allow retry
_handleDisconnection();
// Don't disconnect on battery request failure - it may be transient
_batteryRequested = false;
}
}