Commit a2f464c
committed
refactor: update notification handling and data access logic
1. Changed BubbleNotifyItem to AppNotifyItem in NotifyStagingModel for
better naming consistency
2. Simplified DataAccessorProxy by removing redundant source validity
checks
3. Improved entity routing logic with clearer conditions
4. Added proper source initialization in DataAccessorProxy constructor
5. Enhanced removeEntity() to check entity validity before removal
6. Streamlined clear() and removeEntityByApp() to only operate on source
The changes improve code maintainability and reduce redundant
checks while maintaining the same functionality. The naming change
from BubbleNotifyItem to AppNotifyItem better reflects the item's
purpose, and the data access logic simplification makes the code more
straightforward and less error-prone.
refactor: 更新通知处理和数据访问逻辑
1. 在 NotifyStagingModel 中将 BubbleNotifyItem 改为 AppNotifyItem 以提高
命名一致性
2. 通过移除冗余的源有效性检查简化了 DataAccessorProxy
3. 使用更清晰的条件改进了实体路由逻辑
4. 在 DataAccessorProxy 构造函数中添加了适当的源初始化
5. 增强了 removeEntity() 在删除前检查实体有效性
6. 简化了 clear() 和 removeEntityByApp() 使其仅操作源数据
这些变更提高了代码可维护性,在保持相同功能的同时减少了冗余检查。从
BubbleNotifyItem 到 AppNotifyItem 的命名更改更好地反映了项目的用途,数据
访问逻辑的简化使代码更加直接且不易出错。1 parent 92f8ba3 commit a2f464c
File tree
2 files changed
+34
-58
lines changed- panels/notification
- center
- common
2 files changed
+34
-58
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
41 | | - | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
45 | | - | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 60 | + | |
56 | 61 | | |
57 | | - | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
73 | 72 | | |
| 73 | + | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 88 | + | |
| 89 | + | |
93 | 90 | | |
94 | 91 | | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
99 | 96 | | |
100 | | - | |
101 | | - | |
102 | | - | |
| 97 | + | |
103 | 98 | | |
104 | | - | |
105 | 99 | | |
106 | 100 | | |
107 | 101 | | |
108 | 102 | | |
109 | 103 | | |
110 | 104 | | |
111 | 105 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 106 | + | |
115 | 107 | | |
116 | | - | |
117 | 108 | | |
118 | 109 | | |
119 | 110 | | |
120 | 111 | | |
121 | 112 | | |
122 | 113 | | |
123 | 114 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 115 | + | |
| 116 | + | |
128 | 117 | | |
129 | 118 | | |
130 | 119 | | |
131 | 120 | | |
132 | 121 | | |
133 | 122 | | |
134 | 123 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 124 | + | |
| 125 | + | |
139 | 126 | | |
140 | 127 | | |
141 | 128 | | |
142 | 129 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 130 | + | |
147 | 131 | | |
148 | 132 | | |
149 | 133 | | |
150 | 134 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
154 | 138 | | |
155 | 139 | | |
156 | 140 | | |
157 | 141 | | |
158 | 142 | | |
159 | 143 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 144 | + | |
165 | 145 | | |
166 | 146 | | |
167 | 147 | | |
168 | 148 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 149 | + | |
174 | 150 | | |
175 | 151 | | |
176 | 152 | | |
| |||
0 commit comments