diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-09-18 00:22:33 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-09-18 00:45:50 +0200 |
commit | cfca7157b98c9dc8e0852fe6484bc3f75008af7d (patch) | |
tree | 32b92340908a9374214ec7b84c1fac7ea338f56d /src/notifications/Manager.cpp | |
parent | Merge pull request #728 from Thulinma/goto (diff) | |
download | nheko-cfca7157b98c9dc8e0852fe6484bc3f75008af7d.tar.xz |
Change indentation to 4 spaces
Diffstat (limited to 'src/notifications/Manager.cpp')
-rw-r--r-- | src/notifications/Manager.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/notifications/Manager.cpp b/src/notifications/Manager.cpp index be580b08..f24a48ff 100644 --- a/src/notifications/Manager.cpp +++ b/src/notifications/Manager.cpp @@ -11,30 +11,30 @@ QString NotificationsManager::getMessageTemplate(const mtx::responses::Notification ¬ification) { - const auto sender = - cache::displayName(QString::fromStdString(notification.room_id), - QString::fromStdString(mtx::accessors::sender(notification.event))); + const auto sender = + cache::displayName(QString::fromStdString(notification.room_id), + QString::fromStdString(mtx::accessors::sender(notification.event))); - // TODO: decrypt this message if the decryption setting is on in the UserSettings - if (auto msg = std::get_if<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>( - ¬ification.event); - msg != nullptr) { - return tr("%1 sent an encrypted message").arg(sender); - } + // TODO: decrypt this message if the decryption setting is on in the UserSettings + if (auto msg = std::get_if<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>( + ¬ification.event); + msg != nullptr) { + return tr("%1 sent an encrypted message").arg(sender); + } - if (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Emote) { - return tr("* %1 %2", - "Format an emote message in a notification, %1 is the sender, %2 the " - "message") - .arg(sender); - } else if (utils::isReply(notification.event)) { - return tr("%1 replied: %2", - "Format a reply in a notification. %1 is the sender, %2 the message") - .arg(sender); - } else { - return tr("%1: %2", - "Format a normal message in a notification. %1 is the sender, %2 the " - "message") - .arg(sender); - } + if (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Emote) { + return tr("* %1 %2", + "Format an emote message in a notification, %1 is the sender, %2 the " + "message") + .arg(sender); + } else if (utils::isReply(notification.event)) { + return tr("%1 replied: %2", + "Format a reply in a notification. %1 is the sender, %2 the message") + .arg(sender); + } else { + return tr("%1: %2", + "Format a normal message in a notification. %1 is the sender, %2 the " + "message") + .arg(sender); + } } |