mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix Linux HTML notifications
This commit is contained in:
parent
b05657d51a
commit
dcd9b80dde
1 changed files with 6 additions and 5 deletions
|
@ -154,11 +154,12 @@ NotificationsManager::notificationClosed(uint id, uint reason)
|
||||||
QString
|
QString
|
||||||
NotificationsManager::formatNotification(const QString &text)
|
NotificationsManager::formatNotification(const QString &text)
|
||||||
{
|
{
|
||||||
static auto capabilites = dbus.call("GetCapabilites");
|
static auto capabilites = dbus.call("GetCapabilities").arguments();
|
||||||
if (capabilites.arguments().contains("body-markup"))
|
for (auto x : capabilites)
|
||||||
return text;
|
if (x.toStringList().contains("body-markup"))
|
||||||
else
|
return utils::markdownToHtml(text);
|
||||||
return QTextDocumentFragment::fromHtml(text).toPlainText();
|
|
||||||
|
return QTextDocumentFragment::fromHtml(utils::markdownToHtml(text)).toPlainText();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue