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) {
_incomingQueue.add(newLog);
if (_incomingQueue.length > incomingBufferBreakpoint) {
logs.removeRange(0, _incomingQueue.length - logBufferLimit);
_incomingQueue.removeRange(0, _incomingQueue.length - logBufferLimit);
}
} else {
logs.add(newLog);