ui: fix tabclose events distribution
This commit is contained in:
parent
19c8fba445
commit
e2fa3c91e2
2 changed files with 9 additions and 3 deletions
|
|
@ -221,8 +221,9 @@ export default class MessageManager {
|
|||
}
|
||||
}
|
||||
|
||||
lastMsgArr.sort((a, b) => a[1] - b[1]);
|
||||
lastMsgArr.forEach(([tabId, lastMessageTs]) => {
|
||||
lastMsgArr
|
||||
.sort((a, b) => a[1] - b[1])
|
||||
.forEach(([tabId, lastMessageTs]) => {
|
||||
this.tabCloseManager.append({ tabId, time: lastMessageTs });
|
||||
});
|
||||
};
|
||||
|
|
@ -371,6 +372,9 @@ export default class MessageManager {
|
|||
this.mouseThrashingManager.append(msg);
|
||||
break;
|
||||
case MType.MouseMove:
|
||||
if (this.tabs[msg.tabId].lastMessageTs < msg.time) {
|
||||
this.tabs[msg.tabId].lastMessageTs = msg.time;
|
||||
}
|
||||
this.mouseMoveManager.append(msg);
|
||||
break;
|
||||
case MType.MouseClickDeprecated:
|
||||
|
|
|
|||
|
|
@ -200,7 +200,9 @@ export default class TabSessionManager {
|
|||
|
||||
firstTitleSet = false
|
||||
distributeMessage(msg: Message): void {
|
||||
this.lastMessageTs = msg.time;
|
||||
if (this.lastMessageTs < msg.time) {
|
||||
this.lastMessageTs = msg.time;
|
||||
}
|
||||
switch (msg.tp) {
|
||||
case MType.CanvasNode:
|
||||
const managerId = `${msg.timestamp}_${msg.nodeId}`;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue