Commit 3cd4190
committed
Dashboard: Surface an interrupted-session warning card
Fold the interruption event into the dashboard state and render a dismissible warning card directly under the status hero, only on a device whose charge-control support is positively resolved and only when an event is present. The title reflects the outcome (restored / needs attention / unconfirmed) and the body pairs a neutral reason sentence with an outcome sentence; a single Dismiss button clears it.
An explicit policy write from the dashboard supersedes a non-successful warning: applyPolicy clears a pending event and cancels the recovery notification on a successful write. Wiring stays at the composition root (MainActivity passes onDismissInterruption) so the screen remains pure and previewable; the ready-dashboard preview gains a restored-late fixture.1 parent 2a4f274 commit 3cd4190
7 files changed
Lines changed: 249 additions & 7 deletions
File tree
- app/src
- debug/java/eu/darken/amply/screenshots
- main
- java/eu/darken/amply/main/ui
- dashboard
- res/values
- test/java/eu/darken/amply/main/ui/dashboard
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| |||
Lines changed: 67 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
| |||
740 | 751 | | |
741 | 752 | | |
742 | 753 | | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
743 | 794 | | |
744 | 795 | | |
745 | 796 | | |
| |||
802 | 853 | | |
803 | 854 | | |
804 | 855 | | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
805 | 863 | | |
806 | 864 | | |
807 | 865 | | |
| |||
852 | 910 | | |
853 | 911 | | |
854 | 912 | | |
| 913 | + | |
855 | 914 | | |
856 | 915 | | |
857 | 916 | | |
| |||
945 | 1004 | | |
946 | 1005 | | |
947 | 1006 | | |
| 1007 | + | |
948 | 1008 | | |
949 | 1009 | | |
950 | 1010 | | |
| |||
1020 | 1080 | | |
1021 | 1081 | | |
1022 | 1082 | | |
| 1083 | + | |
1023 | 1084 | | |
1024 | 1085 | | |
1025 | 1086 | | |
| |||
1091 | 1152 | | |
1092 | 1153 | | |
1093 | 1154 | | |
| 1155 | + | |
1094 | 1156 | | |
1095 | 1157 | | |
1096 | 1158 | | |
| |||
1164 | 1226 | | |
1165 | 1227 | | |
1166 | 1228 | | |
| 1229 | + | |
1167 | 1230 | | |
1168 | 1231 | | |
1169 | 1232 | | |
| |||
1225 | 1288 | | |
1226 | 1289 | | |
1227 | 1290 | | |
| 1291 | + | |
1228 | 1292 | | |
1229 | 1293 | | |
1230 | 1294 | | |
| |||
1293 | 1357 | | |
1294 | 1358 | | |
1295 | 1359 | | |
| 1360 | + | |
1296 | 1361 | | |
1297 | 1362 | | |
1298 | 1363 | | |
| |||
1362 | 1427 | | |
1363 | 1428 | | |
1364 | 1429 | | |
| 1430 | + | |
1365 | 1431 | | |
1366 | 1432 | | |
1367 | 1433 | | |
| |||
1416 | 1482 | | |
1417 | 1483 | | |
1418 | 1484 | | |
| 1485 | + | |
1419 | 1486 | | |
1420 | 1487 | | |
1421 | 1488 | | |
| |||
Lines changed: 32 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
| 126 | + | |
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| |||
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
136 | | - | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
141 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
142 | 158 | | |
143 | 159 | | |
144 | 160 | | |
| |||
173 | 189 | | |
174 | 190 | | |
175 | 191 | | |
176 | | - | |
| 192 | + | |
177 | 193 | | |
178 | 194 | | |
179 | 195 | | |
180 | 196 | | |
181 | | - | |
182 | | - | |
183 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
184 | 201 | | |
185 | 202 | | |
186 | 203 | | |
| |||
327 | 344 | | |
328 | 345 | | |
329 | 346 | | |
330 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
331 | 354 | | |
332 | 355 | | |
333 | 356 | | |
| |||
446 | 469 | | |
447 | 470 | | |
448 | 471 | | |
| 472 | + | |
| 473 | + | |
449 | 474 | | |
450 | 475 | | |
451 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
390 | 401 | | |
391 | 402 | | |
392 | 403 | | |
| |||
0 commit comments