1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-25 12:43:30 +00:00

Updated windows dialog, so when messages are appended, timeout is reset

This commit is contained in:
Bryan Roe
2022-01-26 14:49:28 -08:00
parent b74d71b989
commit a03200e910
2 changed files with 10 additions and 5 deletions

View File

@@ -404,6 +404,11 @@ function createLocal(title, caption, username, options)
this.messages.push(msg);
if (this.pump._HANDLE && this.pump._captionHwnd)
{
if (this.pump.timeout != null)
{
clearTimeout(this.pump.timeout);
this.pump.timeout = setTimeout(pump_onTimeout, this.pump.options.timeout, this.pump);
}
this.pump._addAsyncMethodCall(this.pump._user32.SetWindowTextW.async, [this.pump._captionHwnd, GM.CreateVariable(this.messages.join('\r\n'), { wide: true })]);
this.pump._user32.PostMessageA(this.pump._HANDLE, WM_USER, 0, 0);
}