Skip to content

fix: move image decoding logic from bubble item to notify entity#1671

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
xujin177:bugfix/PMS-370701
Jul 23, 2026
Merged

fix: move image decoding logic from bubble item to notify entity#1671
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
xujin177:bugfix/PMS-370701

Conversation

@xujin177

Copy link
Copy Markdown
Contributor

The image decoding functions (copyLineRGB32, copyLineARGB32, decodeImageFromDBusArgument, decodeImageToBase64,
imagePathOfNotification) and the appIcon resolution logic have been moved from BubbleItem to NotifyEntity. This refactoring centralizes image processing in the entity layer, reducing code duplication and enabling reuse of the resolved icon logic in the NotificationManager. The new appIconResolved() method replaces the local logic in BubbleItem::appIcon(), and the manager now pre-sets the resolved icon on the entity before further processing.

Log: Refactored notification image handling by moving image decoding from bubble UI to notification entity

Influence:

  1. Verify that notification icons from image-data/icon_data hints are correctly displayed in bubble popups
  2. Test notification icons from appIcon fallback when no hints are provided
  3. Verify that the icon resolution in NotificationManager does not affect existing notification behavior
  4. Test various image formats (RGB32, ARGB32) and edge cases (invalid data, incomplete images)
  5. Verify that base64 data URIs from hints are preserved and displayed correctly
  6. Test with applications that send desktop-entry hints and verify icon lookup

fix: 将图片解码逻辑从气泡项迁移到通知实体

将图片解码函数(copyLineRGB32、copyLineARGB32、
decodeImageFromDBusArgument、decodeImageToBase64、
imagePathOfNotification)以及应用图标解析逻辑从 BubbleItem 移动
到 NotifyEntity。此重构将图片处理集中在实体层,减少代码重复,并使
NotificationManager 能够重用已解析的图标逻辑。新增的 appIconResolved() 方法替代了 BubbleItem::appIcon() 中的本地逻辑,管理器现在在进一步处理前
预先设置已解析的图标到实体。

Log: 重构通知图片处理,将图片解码从气泡 UI 移至通知实体

Influence:

  1. 验证来自 image-data/icon_data 提示的通知图标在气泡弹窗中正确显示
  2. 测试未提供提示时使用 appIcon 回退的通知图标
  3. 验证 NotificationManager 中的图标解析不影响现有通知行为
  4. 测试各种图片格式(RGB32、ARGB32)及边界情况(无效数据、不完整图片)
  5. 验证来自提示的 base64 数据 URI 被正确保留和显示
  6. 测试发送 desktop-entry 提示的应用,验证图标查找功能

PMS: BUG-370701

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @xujin177, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

Hi @xujin177. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Comment thread panels/notification/bubble/bubbleitem.cpp
@xujin177
xujin177 force-pushed the bugfix/PMS-370701 branch from a6e47ed to ff0bf3a Compare July 23, 2026 12:17
Comment thread panels/notification/server/notificationmanager.cpp Outdated
@xujin177
xujin177 force-pushed the bugfix/PMS-370701 branch 3 times, most recently from c2d3ca1 to 08c2a96 Compare July 23, 2026 13:12
18202781743
18202781743 previously approved these changes Jul 23, 2026
@xujin177

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot

deepin-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

This pr cannot be merged! (status: blocked)

@xujin177

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot

deepin-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

This pr cannot be merged! (status: blocked)

The image decoding functions (copyLineRGB32, copyLineARGB32,
decodeImageFromDBusArgument, decodeImageToBase64,
imagePathOfNotification) and the appIcon resolution logic have been
moved from BubbleItem to NotifyEntity. This refactoring centralizes
image processing in the entity layer, reducing code duplication and
enabling reuse of the resolved icon logic in the NotificationManager.
The new appIconResolved() method replaces the local logic in
BubbleItem::appIcon(), and the manager now pre-sets the resolved icon on
the entity before further processing.

Log: Moving image decoding from bubble UI to notification entity

Influence:
1. Verify that notification icons from image-data/icon_data hints are
correctly displayed in bubble popups
2. Test notification icons from appIcon fallback when no hints are
provided
3. Verify that the icon resolution in NotificationManager does not
affect existing notification behavior
4. Test various image formats (RGB32, ARGB32) and edge cases (invalid
data, incomplete images)
5. Verify that base64 data URIs from hints are preserved and displayed
correctly
6. Test with applications that send desktop-entry hints and verify icon
lookup

fix: 将图片解码逻辑从气泡项迁移到通知实体

将图片解码函数(copyLineRGB32、copyLineARGB32、
decodeImageFromDBusArgument、decodeImageToBase64、
imagePathOfNotification)以及应用图标解析逻辑从 BubbleItem 移动
到 NotifyEntity。此重构将图片处理集中在实体层,减少代码重复,并使
NotificationManager 能够重用已解析的图标逻辑。新增的 appIconResolved()
方法替代了 BubbleItem::appIcon() 中的本地逻辑,管理器现在在进一步处理前
预先设置已解析的图标到实体。

Log: 将图片解码从气泡 UI 移至通知实体

Influence:
1. 验证来自 image-data/icon_data 提示的通知图标在气泡弹窗中正确显示
2. 测试未提供提示时使用 appIcon 回退的通知图标
3. 验证 NotificationManager 中的图标解析不影响现有通知行为
4. 测试各种图片格式(RGB32、ARGB32)及边界情况(无效数据、不完整图片)
5. 验证来自提示的 base64 数据 URI 被正确保留和显示
6. 测试发送 desktop-entry 提示的应用,验证图标查找功能

PMS: BUG-370701
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, xujin177

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

@xujin177

Copy link
Copy Markdown
Contributor Author

/merge

@18202781743

Copy link
Copy Markdown
Contributor

/forcemerge

@deepin-bot

deepin-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

This pr cannot be merged! (status: blocked)

@deepin-bot

deepin-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit 51e9edc into linuxdeepin:master Jul 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants