fix: prioritize notification-specific image hints in appIcon#1654
fix: prioritize notification-specific image hints in appIcon#1654xujin177 wants to merge 1 commit into
Conversation
1. Changed appIcon() to check image/icon data hints from notification hints first 2. Return icon from hints earlier if available, avoiding fallback to generic app icon 3. Simplified fallback to return empty string when no hints or app icon present Log: Fixed app icon display to prioritize notification-specific image data over generic app icon Influence: 1. Test notifications with custom image hints to verify correct icon display 2. Test notifications without image hints to ensure fallback to app icon works 3. Verify behavior with empty app icon and no hints 4. Check backward compatibility with existing notification formats fix: 在appIcon中优先显示通知特定的图像提示 1. 修改appIcon()方法,优先从通知提示中检查图像/图标数据 2. 如果有提示中的图标,则提前返回,避免回退到通用应用图标 3. 当没有提示或应用图标时,简化处理为返回空字符串 Log: 修复通知图标显示,优先使用通知特定的图像数据而非通用应用图标 Influence: 1. 测试带有自定义图像提示的通知,验证正确显示图标 2. 测试没有图像提示的通知,确保正确回退到应用图标 3. 验证应用图标为空且无提示时的表现 4. 检查与现有通知格式的向后兼容性 PMS: BUG-367549
Reviewer's guide (collapsed on small PRs)Reviewer's GuideApp icon resolution in notification bubbles is updated to prioritize notification-specific image hints, returning that image when available and simplifying the fallback when neither hints nor an app icon are present. Flow diagram for updated appIcon notification icon resolutionflowchart TD
A[appIcon] --> B["imagePathOfNotification(m_entity.hints(), m_entity.appIcon(), m_entity.appName())"]
B --> C{iconFromHints isEmpty}
C -->|false| D[return iconFromHints]
C -->|true| E{m_entity.appIcon isEmpty}
E -->|false| F[return m_entity.appIcon]
E -->|true| G[return empty QString]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
|
TAG Bot New tag: 2.0.49 |
Log: Fixed app icon display to prioritize notification-specific image data over generic app icon
Influence:
fix: 在appIcon中优先显示通知特定的图像提示
Log: 修复通知图标显示,优先使用通知特定的图像数据而非通用应用图标
Influence:
PMS: BUG-367549
Summary by Sourcery
Bug Fixes: