Skip to content

fix: prevent persistent notification when update download fails due to full disk#247

Merged
zhaohuiw42 merged 1 commit into
linuxdeepin:masterfrom
zhaohuiw42:master
Oct 29, 2025
Merged

fix: prevent persistent notification when update download fails due to full disk#247
zhaohuiw42 merged 1 commit into
linuxdeepin:masterfrom
zhaohuiw42:master

Conversation

@zhaohuiw42
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 29, 2025

CLA Assistant Lite bot:
提交邮箱中包含我们的合作伙伴,但您似乎并非合作伙伴的成员或对接人,请联系相关对接人将您添加至组织之中,或由其重新发起 Pull Request。
The commit email domain belongs to one of our partners, but it seems you are not yet a member of the current organization, please contact the contact person to add you to the organization or let them submit the Pull Request.

You can retrigger this bot by commenting recheck in this Pull Request

@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

我来分析一下这段代码的修改:

  1. 修改内容:
    system.NotifyExpireTimeoutNoHide 改为 system.NotifyExpireTimeoutDefault

  2. 代码质量分析:

  • 这段代码是在处理磁盘空间不足时的通知逻辑
  • 修改涉及通知的超时行为,从"不自动隐藏"改为"默认超时"
  1. 改进建议:

优点:

  • 用户体验更好。通知在默认时间后自动消失,不会一直停留在通知区域
  • 减少了通知区域的 clutter(混乱)

潜在问题:

  • 需要确保 system.NotifyExpireTimeoutDefault 的超时时间设置合理,应该给用户足够的时间阅读通知内容
  • 建议在代码注释中说明为什么使用默认超时而不是不自动隐藏

建议改进:

// 使用默认超时而不是不自动隐藏,以提供更好的用户体验
// 通知将在默认时间后自动消失,避免通知区域过于拥挤
go m.sendNotify(updateNotifyShowOptional, 0, "preferences-system", "", msg, nil, nil, system.NotifyExpireTimeoutDefault)
  1. 安全性:
  • 这个修改不涉及安全风险,只是改变了通知的显示行为
  1. 性能:
  • 这个修改对性能没有影响,只是改变了通知的显示时间

总结:
这是一个合理的改进,提升了用户体验。建议添加适当的注释来说明修改的原因,这样其他开发者也能理解这个设计决策。

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: qiuzhiqian, zhaohuiw42

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zhaohuiw42 zhaohuiw42 merged commit 11664fe into linuxdeepin:master Oct 29, 2025
12 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants