mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
make lint
This commit is contained in:
parent
98b2fee71b
commit
5da6ab0aec
1 changed files with 12 additions and 13 deletions
|
@ -214,19 +214,18 @@ NotificationsManager::formatNotification(const mtx::responses::Notification ¬
|
||||||
": ");
|
": ");
|
||||||
|
|
||||||
if (hasMarkup_) {
|
if (hasMarkup_) {
|
||||||
if (hasImages_ &&
|
if (hasImages_ && mtx::accessors::msg_type(notification.event) ==
|
||||||
mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image)
|
mtx::events::MessageType::Image) {
|
||||||
{
|
QString imgPath = cacheImage(notification.event);
|
||||||
QString imgPath = cacheImage(notification.event);
|
if (imgPath.isNull())
|
||||||
if (imgPath.isNull())
|
return mtx::accessors::formattedBodyWithFallback(notification.event)
|
||||||
return mtx::accessors::formattedBodyWithFallback(notification.event).prepend(messageLeadIn);
|
.prepend(messageLeadIn);
|
||||||
else
|
else
|
||||||
return QString(
|
return QString("<img src=\"file:///" + imgPath + "\" alt=\"" +
|
||||||
"<img src=\"file:///" + imgPath +
|
mtx::accessors::formattedBodyWithFallback(
|
||||||
"\" alt=\"" +
|
notification.event) +
|
||||||
mtx::accessors::formattedBodyWithFallback(notification.event) +
|
"\">")
|
||||||
"\">")
|
.prepend(messageLeadIn);
|
||||||
.prepend(messageLeadIn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return mtx::accessors::formattedBodyWithFallback(notification.event)
|
return mtx::accessors::formattedBodyWithFallback(notification.event)
|
||||||
|
|
Loading…
Reference in a new issue