Commit 63c6cd3
committed
fix: correct bubble ID handling in notification system
Fixed incorrect bubble ID comparison in removeById method that was
causing bubble deletion failures. The method was comparing against
bubbleId() instead of id(), preventing proper bubble removal. Removed
the unused getBubbleIdByStorageId method and simplified the closeBubble
logic by directly using the provided ID without unnecessary entity
lookups and ID conversions.
The issue occurred because bubbleId and storageId were being confused
in the deletion process. The removeById method was incorrectly checking
bubbleId() instead of the actual item id(), making it impossible to find
and remove bubbles by their correct identifier. This also eliminated the
need for the complex ID mapping logic in closeBubble.
Influence:
1. Test bubble deletion functionality by closing notification bubbles
2. Verify that bubbles are properly removed from the interface when
closed
3. Check that no orphaned bubbles remain after deletion attempts
4. Test with multiple bubbles to ensure correct individual bubble
removal
5. Verify bubble count decreases appropriately after deletions
fix: 修正通知系统中气泡ID处理问题
修复了removeById方法中错误的气泡ID比较问题,该问题导致气泡删除失败。方
法之前比较的是bubbleId()而不是id(),阻止了正确的气泡移除。移除了未使用
的getBubbleIdByStorageId方法,并通过直接使用提供的ID简化了closeBubble逻
辑,无需不必要的实体查找和ID转换。
该问题的发生是因为在删除过程中混淆了bubbleId和storageId。removeById方法
错误地检查bubbleId()而不是实际的item id(),导致无法通过正确的标识符找到
和移除气泡。这也消除了closeBubble中复杂的ID映射逻辑的需求。
Influence:
1. 测试气泡删除功能,关闭通知气泡
2. 验证关闭时气泡是否正确从界面移除
3. 检查删除尝试后是否没有残留的孤立气泡
4. 使用多个气泡测试,确保正确移除单个气泡
5. 验证删除后气泡计数是否适当减少
PMS: BUG-3373951 parent 71c0b3b commit 63c6cd3
File tree
3 files changed
+2
-22
lines changed- panels/notification/bubble
3 files changed
+2
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | 148 | | |
160 | 149 | | |
161 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | 141 | | |
150 | 142 | | |
151 | 143 | | |
152 | | - | |
| 144 | + | |
153 | 145 | | |
154 | 146 | | |
155 | 147 | | |
| |||
0 commit comments