fix: update children in ui on pause

This commit is contained in:
Peace 2024-10-13 01:14:24 +02:00
parent 703e3d0fae
commit b4fabbb00f
No known key found for this signature in database
GPG key ID: 0EF6B46E172B739F

View file

@ -987,6 +987,11 @@ let needSetup = false;
await startMonitor(socket.userID, monitorID); await startMonitor(socket.userID, monitorID);
await server.sendUpdateMonitorIntoList(socket, monitorID); await server.sendUpdateMonitorIntoList(socket, monitorID);
const childrenIDs = await Monitor.getAllChildrenIDs(monitorID);
for (let childID of childrenIDs) {
await server.sendUpdateMonitorIntoList(socket, childID);
}
callback({ callback({
ok: true, ok: true,
msg: "successResumed", msg: "successResumed",
@ -1007,6 +1012,11 @@ let needSetup = false;
await pauseMonitor(socket.userID, monitorID); await pauseMonitor(socket.userID, monitorID);
await server.sendUpdateMonitorIntoList(socket, monitorID); await server.sendUpdateMonitorIntoList(socket, monitorID);
const childrenIDs = await Monitor.getAllChildrenIDs(monitorID);
for (let childID of childrenIDs) {
await server.sendUpdateMonitorIntoList(socket, childID);
}
callback({ callback({
ok: true, ok: true,
msg: "successPaused", msg: "successPaused",