mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +02:00
fix(notification): body should be optional on iOS (#1737)
This commit is contained in:
committed by
GitHub
parent
12e80ffe00
commit
3d301c654e
@@ -32,9 +32,11 @@ func makeNotificationContent(_ notification: Notification) throws -> UNNotificat
|
||||
let content = UNMutableNotificationContent()
|
||||
content.title = NSString.localizedUserNotificationString(
|
||||
forKey: notification.title, arguments: nil)
|
||||
content.body = NSString.localizedUserNotificationString(
|
||||
forKey: notification.body,
|
||||
arguments: nil)
|
||||
if let body = notification.body {
|
||||
content.body = NSString.localizedUserNotificationString(
|
||||
forKey: body,
|
||||
arguments: nil)
|
||||
}
|
||||
|
||||
content.userInfo = [
|
||||
"__EXTRA__": notification.extra as Any,
|
||||
|
||||
Reference in New Issue
Block a user