Remove ifdef for older versions of KNotifications

We require a newer version
This commit is contained in:
Tobias Fella
2021-10-03 14:15:00 +02:00
parent 452380e274
commit 1345ddc9ee

View File

@@ -60,14 +60,12 @@ void NotificationsManager::postNotification(NeoChatRoom *room,
Q_EMIT Controller::instance().showWindow();
});
#if KNOTIFICATIONS_VERSION >= QT_VERSION_CHECK(5, 81, 0)
std::unique_ptr<KNotificationReplyAction> replyAction(new KNotificationReplyAction(i18n("Reply")));
replyAction->setPlaceholderText(i18n("Reply..."));
connect(replyAction.get(), &KNotificationReplyAction::replied, this, [room, replyEventId](const QString &text) {
room->postMessage(text, room->preprocessText(text), RoomMessageEvent::MsgType::Text, replyEventId, QString());
});
notification->setReplyAction(std::move(replyAction));
#endif
notification->sendEvent();