From 99435c9b2e43845312f92489f4fa06af1965c60f Mon Sep 17 00:00:00 2001 From: Michal Iskierko Date: Fri, 1 Apr 2022 18:01:18 +0200 Subject: [PATCH] feature(desktop/general): Expose showing icon badge notification functions Issue #4922 --- src/nimqml/private/dotherside.nim | 2 ++ src/nimqml/private/status/statusosnotification.nim | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/nimqml/private/dotherside.nim b/src/nimqml/private/dotherside.nim index 9a29b40..25161b0 100644 --- a/src/nimqml/private/dotherside.nim +++ b/src/nimqml/private/dotherside.nim @@ -352,6 +352,8 @@ proc dos_osnotification_create(): DosStatusOSNotification proc dos_osnotification_show_notification(vptr: DosStatusOSNotification, title: cstring, messsage: cstring, identifier: cstring) {.cdecl, dynlib: dynLibName, importc.} +proc dos_osnotification_show_badge_notification(vptr: DosStatusOSNotification, notificationsCount: int) + {.cdecl, dynlib: dynLibName, importc.} proc dos_osnotification_delete(vptr: DosStatusOSNotification) {.cdecl, dynlib: dynLibName, importc.} diff --git a/src/nimqml/private/status/statusosnotification.nim b/src/nimqml/private/status/statusosnotification.nim index 19d2d1b..cd7f1a8 100644 --- a/src/nimqml/private/status/statusosnotification.nim +++ b/src/nimqml/private/status/statusosnotification.nim @@ -12,3 +12,6 @@ proc newStatusOSNotification*(): StatusOSNotification = proc showNotification*(self: StatusOSNotification, title: string, message: string, identifier: string) = dos_osnotification_show_notification(self.vptr, title, message, identifier) + +proc showIconBadgeNotification*(self: StatusOSNotification, notificationsCount: int) = + dos_osnotification_show_badge_notification(self.vptr, notificationsCount) \ No newline at end of file