mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
Remove artificial UI delays
This commit is contained in:
@@ -1181,11 +1181,9 @@ class ConnectionProvider with ChangeNotifier {
|
|||||||
// behavior, then reconcile with an on-device refresh below.
|
// behavior, then reconcile with an on-device refresh below.
|
||||||
onChannelInfoReceived?.call(channelIdx, '', Uint8List(16), null);
|
onChannelInfoReceived?.call(channelIdx, '', Uint8List(16), null);
|
||||||
|
|
||||||
// Small delay to allow the response to propagate
|
// Refresh channel from device to reconcile UI state.
|
||||||
await Future.delayed(const Duration(milliseconds: 100));
|
// BLE commands are processed in order by firmware, so the
|
||||||
|
// getChannel response reflects the completed deletion.
|
||||||
// Refresh channels to update UI
|
|
||||||
// The empty channel will trigger removal via onChannelInfoReceived callback
|
|
||||||
await _activeService.getChannel(channelIdx);
|
await _activeService.getChannel(channelIdx);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
_pendingDeletedChannelIndices.remove(channelIdx);
|
_pendingDeletedChannelIndices.remove(channelIdx);
|
||||||
@@ -1438,10 +1436,6 @@ class ConnectionProvider with ChangeNotifier {
|
|||||||
);
|
);
|
||||||
debugPrint(' trackSentChannelMessage completed');
|
debugPrint(' trackSentChannelMessage completed');
|
||||||
|
|
||||||
// Small delay to ensure the message is in the MessagesProvider list
|
|
||||||
// before we try to mark it as sent
|
|
||||||
await Future.delayed(const Duration(milliseconds: 50));
|
|
||||||
|
|
||||||
// Use a dummy ACK tag (0) and timeout (0) for channel messages
|
// Use a dummy ACK tag (0) and timeout (0) for channel messages
|
||||||
// This will trigger the callback to mark the message as "sent"
|
// This will trigger the callback to mark the message as "sent"
|
||||||
debugPrint(' Calling onMessageSent callback...');
|
debugPrint(' Calling onMessageSent callback...');
|
||||||
|
|||||||
Reference in New Issue
Block a user