feat: added notifications to the Network module: connectivity, interface, local and public IP, WiFi network (#2261)

This commit is contained in:
Serhiy Mytrovtsiy
2025-01-25 21:06:07 +01:00
parent cdfde35d7d
commit 02b4f4e8e0
5 changed files with 164 additions and 2 deletions

View File

@@ -62,6 +62,18 @@ open class NotificationsWrapper: NSStackView {
}
}
public func newNotification(id rid: String, title: String, subtitle: String? = nil) {
let id = "Stats_\(self.module)_\(rid)"
if self.ids[id] != nil {
removeNotification(id)
self.ids[id] = nil
}
self.showNotification(id: id, title: title, subtitle: subtitle)
self.ids[id] = true
}
public func hideNotification(_ rid: String) {
let id = "Stats_\(self.module)_\(rid)"
if self.ids[id] != nil {