-
Notifications
You must be signed in to change notification settings - Fork 65
Feat 增加团队监控倒计时条强制设置nRefresh #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat 增加团队监控倒计时条强制设置nRefresh #82
The head ref may contain hidden characters: "feat--\u589E\u52A0\u56E2\u961F\u76D1\u63A7\u5012\u8BA1\u65F6\u6761\u5F3A\u5236\u8BBE\u7F6EnRefresh"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds forced nRefresh setting for team monitoring countdown timers. The change modifies the countdown timer behavior to handle specific time values (-1 and -2) by forcing the nRefresh parameter to update expiration times.
- Adds logic to handle nRefresh parameter when tTime.nTime is -1 or -2
- Forces expiration time updates based on nRefresh values with a 3ms buffer
- Includes Chinese comments explaining the forced refresh functionality
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if ui and ui:IsValid() then | ||
| ui.obj:RemoveItem() | ||
| end | ||
| -- 2025.08.25增加倒计时条强制设置nRefresh,nTime为-1,-2强制更改nRefresh,为兼容旧数据,先判断有nRefresh字段再修改 |
Copilot
AI
Aug 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment contains garbled Chinese characters (���ӵ���ʱ��ǿ������nRefresh��nTimeΪ-1��-2ǿ�Ƹ���nRefresh��Ϊ���ݾ����ݣ����ж���nRefresh�ֶ�����). The comment should use proper UTF-8 encoding for Chinese characters.
| -- 2025.08.25���ӵ���ʱ��ǿ������nRefresh��nTimeΪ-1��-2ǿ�Ƹ���nRefresh��Ϊ���ݾ����ݣ����ж���nRefresh�ֶ����� | |
| -- 2025.08.25 新增倒计时强制刷新,nRefresh:nTime为-1或-2时强制刷新,nRefresh为刷新间隔,未设置则不刷新,nRefresh字段可修改 |
| ST_TIME_EXPIRE[nType][szKey] = nTime + tParam.nRefresh * 1000 - 3 | ||
| end | ||
| elseif tTime.nTime == -2 then | ||
| ST_TIME_EXPIRE[nType][szKey] = nil | ||
| ST_TIME_EXPIRE[nType][szKey] = nTime + (tParam.nRefresh or 0) * 1000 - 3 |
Copilot
AI
Aug 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number '3' appears in both lines 151 and 154 without explanation. Consider defining this as a named constant (e.g., EXPIRE_BUFFER_MS = 3) to improve code maintainability and make the purpose clear.
No description provided.