Commit 1c3ecc7
Image viewer: refresh ImageSource template key before navigating
ImageSource.TemplateKey defaults to Default when constructed from a URL;
the image viewer's template selector uses that key to pick between the
static-image control and the animated-WebP control. Without the key
being refreshed, animated WebP previews fall through to the static
control and render as "Unsupported format" — which is exactly what
happened when navigating between images with arrow keys.
Same fix the CivitAI flow already applies. Extract a shared
PrepareImageSourceAsync helper that does GetBitmapAsync +
GetOrRefreshTemplateKeyAsync + a defensive try/catch (so a single bad
image doesn't break the whole navigation chain).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0ddad70 commit 1c3ecc7
1 file changed
Lines changed: 28 additions & 5 deletions
Lines changed: 28 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
422 | | - | |
423 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
452 | 454 | | |
453 | 455 | | |
454 | 456 | | |
| |||
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
462 | 485 | | |
463 | 486 | | |
464 | 487 | | |
| |||
0 commit comments