Skip to content
Snippets Groups Projects
Verified Commit 5da6ab0a authored by Loren Burkholder's avatar Loren Burkholder Committed by Nicolas Werner
Browse files

make lint

parent 98b2fee7
No related branches found
No related tags found
No related merge requests found
......@@ -214,19 +214,18 @@ NotificationsManager::formatNotification(const mtx::responses::Notification &not
": ");
if (hasMarkup_) {
if (hasImages_ &&
mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image)
{
QString imgPath = cacheImage(notification.event);
if (imgPath.isNull())
return mtx::accessors::formattedBodyWithFallback(notification.event).prepend(messageLeadIn);
else
return QString(
"<img src=\"file:///" + imgPath +
"\" alt=\"" +
mtx::accessors::formattedBodyWithFallback(notification.event) +
"\">")
.prepend(messageLeadIn);
if (hasImages_ && mtx::accessors::msg_type(notification.event) ==
mtx::events::MessageType::Image) {
QString imgPath = cacheImage(notification.event);
if (imgPath.isNull())
return mtx::accessors::formattedBodyWithFallback(notification.event)
.prepend(messageLeadIn);
else
return QString("<img src=\"file:///" + imgPath + "\" alt=\"" +
mtx::accessors::formattedBodyWithFallback(
notification.event) +
"\">")
.prepend(messageLeadIn);
}
return mtx::accessors::formattedBodyWithFallback(notification.event)
......
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