From 3b8a0e0f4a5c28394ac578e8559bf57ae82d3fd2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 17:59:35 +0200 Subject: feat(notify): add the image field and its cleanup Popup gains image, and the store calls an injected removeImage when an entry is dismissed, evicted, replaced or expired, so a daemon-written PNG does not outlive its balloon. The service decides what is daemon-owned; the store only names the path. NewStore now takes the callback as a third parameter, so the service wires its removeImage in (unlinking only under ImagesDir) and the existing call sites pass nil. --- internal/notify/service_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/notify/service_test.go') diff --git a/internal/notify/service_test.go b/internal/notify/service_test.go index 1e9f771..fb47b98 100644 --- a/internal/notify/service_test.go +++ b/internal/notify/service_test.go @@ -149,7 +149,7 @@ func TestCloseNotificationEmitsReasonThree(t *testing.T) { // so the test exercises arm's closure directly. func TestNaturalExpiryDeletesTheTimerEntry(t *testing.T) { s := &Service{dir: t.TempDir(), timers: map[uint32]*time.Timer{}} - s.store = NewStore(func(id, reason uint32) {}, func(live, history []Popup) {}) + s.store = NewStore(func(id, reason uint32) {}, func(live, history []Popup) {}, nil) id, err := s.Notify("app", 0, "", "s", "b", nil, nil, 50) if err != nil { t.Fatalf("Notify: %v", err) -- cgit v1.2.3