fix: move image decoding logic from bubble item to notify entity#1671
Conversation
|
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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
a6e47ed to
ff0bf3a
Compare
c2d3ca1 to
08c2a96
Compare
|
/merge |
|
This pr cannot be merged! (status: blocked) |
|
/merge |
|
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
08c2a96 to
7e4758b
Compare
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
|
/forcemerge |
|
This pr cannot be merged! (status: blocked) |
|
This pr force 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: Refactored notification image handling by moving image decoding from bubble UI to notification entity
Influence:
fix: 将图片解码逻辑从气泡项迁移到通知实体
将图片解码函数(copyLineRGB32、copyLineARGB32、
decodeImageFromDBusArgument、decodeImageToBase64、
imagePathOfNotification)以及应用图标解析逻辑从 BubbleItem 移动
到 NotifyEntity。此重构将图片处理集中在实体层,减少代码重复,并使
NotificationManager 能够重用已解析的图标逻辑。新增的 appIconResolved() 方法替代了 BubbleItem::appIcon() 中的本地逻辑,管理器现在在进一步处理前
预先设置已解析的图标到实体。
Log: 重构通知图片处理,将图片解码从气泡 UI 移至通知实体
Influence:
PMS: BUG-370701