mirror of
https://github.com/wownero/cyberwow.git
synced 2026-12-03 13:43:59 +01:00
sync state when terminal receive stdout
This commit is contained in:
@@ -251,6 +251,14 @@ class SyncedState extends HookedState {
|
||||
processInput.add(line);
|
||||
}
|
||||
|
||||
void append(String msg) {
|
||||
stdout.addLast(msg);
|
||||
while (stdout.length > config.stdoutLineBufferSize) {
|
||||
stdout.removeFirst();
|
||||
}
|
||||
syncState();
|
||||
}
|
||||
|
||||
void onPageChanged(int value) {
|
||||
this.pageIndex = value;
|
||||
}
|
||||
@@ -263,7 +271,7 @@ class SyncedState extends HookedState {
|
||||
if (!synced) break;
|
||||
|
||||
// print('synced: print stdout loop');
|
||||
stdout.addLast(line);
|
||||
append(line);
|
||||
log.info(line);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user