跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

提交记录
修改Core/Servicers/Instances/Sleepdiscover.cs+10 −3看文件
@@ -226,13 +226,17 @@ namespace Core.Servicers.Instances
226226
227227 private void Sleep()
228228 {
229删除: // 停止离开检测计时器
230删除: timer.Stop();
231删除:
232229 if (status == SleepStatus.Sleep)
233230 {
234231 return;
235232 }
233新增:
234新增: // 卸载事件
235新增: SystemEvents.SessionSwitch -= SystemEvents_SessionSwitch;
236新增:
237新增: // 停止离开检测计时器
238新增: timer?.Stop();
239新增:
236240 status = SleepStatus.Sleep;
237241
238242 // 设置鼠标钩子
@@ -249,6 +253,9 @@ namespace Core.Servicers.Instances
249253 return;
250254 }
251255
256新增: // 注册事件
257新增: SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
258新增:
252259 status = SleepStatus.Wake;
253260
254261 // 卸载鼠标钩子
修改UI/Controls/Navigation/Navigation.cs+1 −1看文件
@@ -426,7 +426,7 @@ namespace UI.Controls.Navigation
426426 private void ScrollToActive(double animationDuration = 0.35)
427427 {
428428 // 获取选中项
429删除: if (SelectedItem == null)
429新增: if (SelectedItem == null || ItemsDictionary.Count == 0 || !ItemsDictionary.ContainsKey(SelectedItem.ID))
430430 {
431431 return;
432432 }