fix(#22): log radio-stats send failure + channel-unread persist failure

Two more connector silent-failures from the review. requestRadioStats had an empty 'catch (_) {}' (now logs). setChannelUnreadCount fired unawaited(saveChannels) with no error path (now .catchError + logs). Verified: setContactUnreadCount calls a void debounced store method -- no call-site Future (Gemini false positive); the actual swallow is inside unread_store's debounce timer, flagged separately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pull/46/head
Strycher 1 month ago
parent 239dbce647
commit e84f171a91

@ -760,9 +760,14 @@ class MeshCoreConnector extends ChangeNotifier {
if (channel != null) {
channel.unreadCount = count;
unawaited(
_channelStore.saveChannels(
_channels.isNotEmpty ? _channels : _cachedChannels,
),
_channelStore
.saveChannels(_channels.isNotEmpty ? _channels : _cachedChannels)
.catchError((Object e) {
_appDebugLogService?.error(
'Failed to persist channel unread count: $e',
tag: 'ChannelStore',
);
}),
);
notifyListeners();
}
@ -2665,7 +2670,12 @@ class MeshCoreConnector extends ChangeNotifier {
if (!supportsCompanionRadioStats) return;
try {
await sendFrame(buildGetStatsFrame(statsTypeRadio));
} catch (_) {}
} catch (e) {
_appDebugLogService?.error(
'Failed to request radio stats: $e',
tag: 'RadioStats',
);
}
}
Future<void> setPathHashMode(int mode) async {

Loading…
Cancel
Save

Powered by TurnKey Linux.