Commit 2261aa6
feat(raw): drop conversions when the user removes the frames
Wires `dropRawConversions` into the two places that already know the user
changed their mind. Removing a set two frames in no longer makes a newly
added set wait about 15 s for frames nobody wants.
Fixes the index those handlers removed by, which had to change for the
wiring to be correct at all. The preview is handed a sorted copy and reports
an index into it; `onRemoveIndex` applied that index to the unsorted stored
array, so once `onAdd` appended a file that sorted earlier, removing an image
deleted the wrong one -- and dropping the conversion for one frame while the
form removed another would have left the cache and the UI disagreeing about
which frame was gone. The index is now resolved against the array the user
saw, and the file removed by identity so the stored order is left alone.
Closes #248
Closes #251
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent ebb5ebc commit 2261aa6
1 file changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| |||
211 | 218 | | |
212 | 219 | | |
213 | 220 | | |
214 | | - | |
| 221 | + | |
215 | 222 | | |
216 | 223 | | |
217 | 224 | | |
| |||
230 | 237 | | |
231 | 238 | | |
232 | 239 | | |
| 240 | + | |
233 | 241 | | |
234 | 242 | | |
235 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
236 | 252 | | |
237 | 253 | | |
238 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
239 | 260 | | |
240 | 261 | | |
241 | 262 | | |
| |||
0 commit comments