Skip to content

Commit 8badb8f

Browse files
committed
fix: icon disappears sometimes
1 parent 7ff5636 commit 8badb8f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

internal/notification/notify.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ func getAppLogo() *[]byte {
2626
}
2727

2828
func getAppIconPath() string {
29-
var iconPath string
29+
path := filepath.Join(os.TempDir(), "cligram-icon.png")
3030
once.Do(func() {
31-
path := filepath.Join(os.TempDir(), "cligram-icon.png")
3231
logoPNG := getAppLogo()
3332

3433
if logoPNG == nil {
@@ -40,9 +39,8 @@ func getAppIconPath() string {
4039
slog.Error(err.Error())
4140
return
4241
}
43-
iconPath = path
4442
})
45-
return iconPath
43+
return path
4644
}
4745

4846
func Notify(title string, message string) {

0 commit comments

Comments
 (0)