fix: When app logs are paused, on incoming queue overflow, the main buffer was cleaned up instead

This commit is contained in:
Inex Code 2024-08-07 17:17:53 +03:00
parent b69e4ad7ff
commit ef743302cd

View file

@ -20,7 +20,7 @@ class ConsoleModel extends ChangeNotifier {
if (paused) { if (paused) {
_incomingQueue.add(newLog); _incomingQueue.add(newLog);
if (_incomingQueue.length > incomingBufferBreakpoint) { if (_incomingQueue.length > incomingBufferBreakpoint) {
logs.removeRange(0, _incomingQueue.length - logBufferLimit); _incomingQueue.removeRange(0, _incomingQueue.length - logBufferLimit);
} }
} else { } else {
logs.add(newLog); logs.add(newLog);