mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Add profile to notifications on KDE
This commit is contained in:
parent
41a9577201
commit
f51188df15
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
||||||
#include "Cache.h"
|
#include "Cache.h"
|
||||||
#include "EventAccessors.h"
|
#include "EventAccessors.h"
|
||||||
#include "MxcImageProvider.h"
|
#include "MxcImageProvider.h"
|
||||||
|
#include "UserSettingsPage.h"
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
|
|
||||||
NotificationsManager::NotificationsManager(QObject *parent)
|
NotificationsManager::NotificationsManager(QObject *parent)
|
||||||
|
@ -161,6 +162,9 @@ NotificationsManager::systemPostNotification(const QString &room_id,
|
||||||
hints[QStringLiteral("desktop-entry")] = "nheko";
|
hints[QStringLiteral("desktop-entry")] = "nheko";
|
||||||
hints[QStringLiteral("category")] = "im.received";
|
hints[QStringLiteral("category")] = "im.received";
|
||||||
|
|
||||||
|
if (auto profile = UserSettings::instance()->profile(); !profile.isEmpty())
|
||||||
|
hints[QStringLiteral("x-kde-origin-name")] = profile;
|
||||||
|
|
||||||
uint replace_id = 0;
|
uint replace_id = 0;
|
||||||
if (!event_id.isEmpty()) {
|
if (!event_id.isEmpty()) {
|
||||||
for (auto elem = notificationIds.begin(); elem != notificationIds.end(); ++elem) {
|
for (auto elem = notificationIds.begin(); elem != notificationIds.end(); ++elem) {
|
||||||
|
|
Loading…
Reference in a new issue