mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added notifications to the Network module: connectivity, interface, local and public IP, WiFi network (#2261)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user