feat: adjusted battery notifications

This commit is contained in:
Serhiy Mytrovtsiy
2023-12-20 13:37:06 +01:00
parent cedb16e2d6
commit 119bc5b067
2 changed files with 16 additions and 2 deletions

View File

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