diff options
author | LcsTen <lcs10.twinoid@gmail.com> | 2023-03-27 15:44:53 +0200 |
---|---|---|
committer | LcsTen <lcs10.twinoid@gmail.com> | 2023-04-14 19:57:35 +0200 |
commit | 7e85e9b12b9cc3360da7e03d4d70f1fdf3d8cab5 (patch) | |
tree | 94ceb7bfdf4095449b19395fe219066074376857 /src | |
parent | Don't send desktop notifications if there are too many of them at once (diff) | |
download | nheko-7e85e9b12b9cc3360da7e03d4d70f1fdf3d8cab5.tar.xz |
Do not display reply action in the recap notif on Mac
Diffstat (limited to 'src')
-rw-r--r-- | src/notifications/ManagerMac.mm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/notifications/ManagerMac.mm b/src/notifications/ManagerMac.mm index 39312465..6da5d006 100644 --- a/src/notifications/ManagerMac.mm +++ b/src/notifications/ManagerMac.mm @@ -106,10 +106,18 @@ void NotificationsManager::objCxxPostNotification( textInputButtonTitle:sendStr.toNSString() textInputPlaceholder:placeholder.toNSString()]; - UNNotificationCategory* category = [UNNotificationCategory categoryWithIdentifier:@"ReplyCategory" - actions:@[ replyAction ] - intentIdentifiers:@[] - options:UNNotificationCategoryOptionNone]; + UNNotificationCategory* category; + if(!room_id.isEmpty()){ + category = [UNNotificationCategory categoryWithIdentifier:@"ReplyCategory" + actions:@[ replyAction ] + intentIdentifiers:@[] + options:UNNotificationCategoryOptionNone]; + }else{ + category = [UNNotificationCategory categoryWithIdentifier:@"ReplyCategory" + actions:@[] + intentIdentifiers:@[] + options:UNNotificationCategoryOptionNone]; + } NSString* title = room_name.toNSString(); NSString* sub = subtitle.toNSString(); |