Skip to content
Snippets Groups Projects
Verified Commit 1212e5b3 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Copy arguments for notification

parent 0b9bbd39
No related branches found
No related tags found
No related merge requests found
Pipeline #4816 passed
......@@ -75,12 +75,12 @@ private:
private:
// Objective-C(++) doesn't like to do lots of regular C++, so the actual notification
// posting is split out
void objCxxPostNotification(const QString &room_name,
const QString &room_id,
const QString &event_id,
const QString &subtitle,
const QString &informativeText,
const QString &bodyImagePath,
void objCxxPostNotification(const QString room_name,
const QString room_id,
const QString event_id,
const QString subtitle,
const QString informativeText,
const QString bodyImagePath,
const bool playSound);
QString respondStr;
......
......@@ -62,12 +62,12 @@
@end
void NotificationsManager::objCxxPostNotification(
const QString& room_name,
const QString& room_id,
const QString& event_id,
const QString& subtitle,
const QString& informativeText,
const QString& bodyImagePath,
const QString room_name,
const QString room_id,
const QString event_id,
const QString subtitle,
const QString informativeText,
const QString bodyImagePath,
const bool enableSound)
{
// Request permissions for alerts (the generic type of notification), sound playback,
......@@ -114,7 +114,7 @@ void NotificationsManager::objCxxPostNotification(
NSString* identifier = event_id.toNSString();
NSString* imgUrl = bodyImagePath.toNSString();
NSSet* categories = [NSSet setWithObjects:summaryCategory, replyCategory, nil];
NSSet* categories = [NSSet setWithArray:@[ summaryCategory, replyCategory ]];
[center setNotificationCategories:categories];
[center getNotificationSettingsWithCompletionHandler:^(
UNNotificationSettings* _Nonnull settings) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment