diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-15 18:04:59 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-15 18:04:59 +0200 |
| commit | 6ad6f122eb2ec9cd8a55c042dffe38db41ed1959 (patch) | |
| tree | 5cc008927b01b23944c5c3e3d8495e7874aa6cbe /internal/notify/service.go | |
| parent | ddf793905cd8739d27003296a5042a7dd905f1d3 (diff) | |
| download | notifyd-6ad6f122eb2ec9cd8a55c042dffe38db41ed1959.tar.gz notifyd-6ad6f122eb2ec9cd8a55c042dffe38db41ed1959.zip | |
test(notify): cover image-data materialisation
TestNotifyMaterialisesImageData drives a 2x2 RGBA image-data hint
through Notify and asserts the PNG is written under the image directory
for the returned id, decodes to the right bounds, and is carried on the
re-published Popup.Image. The encode-error path now logs instead of
dropping the failure silently, matching the WriteImage branch.
Diffstat (limited to 'internal/notify/service.go')
| -rw-r--r-- | internal/notify/service.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/notify/service.go b/internal/notify/service.go index 7bfad6e..a8f0728 100644 --- a/internal/notify/service.go +++ b/internal/notify/service.go @@ -118,6 +118,8 @@ func (s *Service) Notify(appName string, replacesID uint32, appIcon, summary, bo if raw, ok := ImageDataFromHints(hints); ok { if data, err := raw.PNG(); err == nil { pendingImage = data + } else { + log.Printf("notifyd: encode image: %v", err) } } else if path, ok := ImagePathFromHints(hints); ok { n.Image = ResolveIcon(path) |
