mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Copy arguments for notification
This commit is contained in:
parent
0b9bbd3936
commit
1212e5b317
2 changed files with 13 additions and 13 deletions
|
@ -75,12 +75,12 @@ private:
|
||||||
private:
|
private:
|
||||||
// Objective-C(++) doesn't like to do lots of regular C++, so the actual notification
|
// Objective-C(++) doesn't like to do lots of regular C++, so the actual notification
|
||||||
// posting is split out
|
// posting is split out
|
||||||
void objCxxPostNotification(const QString &room_name,
|
void objCxxPostNotification(const QString room_name,
|
||||||
const QString &room_id,
|
const QString room_id,
|
||||||
const QString &event_id,
|
const QString event_id,
|
||||||
const QString &subtitle,
|
const QString subtitle,
|
||||||
const QString &informativeText,
|
const QString informativeText,
|
||||||
const QString &bodyImagePath,
|
const QString bodyImagePath,
|
||||||
const bool playSound);
|
const bool playSound);
|
||||||
|
|
||||||
QString respondStr;
|
QString respondStr;
|
||||||
|
|
|
@ -62,12 +62,12 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
void NotificationsManager::objCxxPostNotification(
|
void NotificationsManager::objCxxPostNotification(
|
||||||
const QString& room_name,
|
const QString room_name,
|
||||||
const QString& room_id,
|
const QString room_id,
|
||||||
const QString& event_id,
|
const QString event_id,
|
||||||
const QString& subtitle,
|
const QString subtitle,
|
||||||
const QString& informativeText,
|
const QString informativeText,
|
||||||
const QString& bodyImagePath,
|
const QString bodyImagePath,
|
||||||
const bool enableSound)
|
const bool enableSound)
|
||||||
{
|
{
|
||||||
// Request permissions for alerts (the generic type of notification), sound playback,
|
// Request permissions for alerts (the generic type of notification), sound playback,
|
||||||
|
@ -114,7 +114,7 @@ void NotificationsManager::objCxxPostNotification(
|
||||||
NSString* identifier = event_id.toNSString();
|
NSString* identifier = event_id.toNSString();
|
||||||
NSString* imgUrl = bodyImagePath.toNSString();
|
NSString* imgUrl = bodyImagePath.toNSString();
|
||||||
|
|
||||||
NSSet* categories = [NSSet setWithObjects:summaryCategory, replyCategory, nil];
|
NSSet* categories = [NSSet setWithArray:@[ summaryCategory, replyCategory ]];
|
||||||
[center setNotificationCategories:categories];
|
[center setNotificationCategories:categories];
|
||||||
[center getNotificationSettingsWithCompletionHandler:^(
|
[center getNotificationSettingsWithCompletionHandler:^(
|
||||||
UNNotificationSettings* _Nonnull settings) {
|
UNNotificationSettings* _Nonnull settings) {
|
||||||
|
|
Loading…
Reference in a new issue