Remove ifdef for older versions of KNotifications
We require a newer version
This commit is contained in:
@@ -60,14 +60,12 @@ void NotificationsManager::postNotification(NeoChatRoom *room,
|
|||||||
Q_EMIT Controller::instance().showWindow();
|
Q_EMIT Controller::instance().showWindow();
|
||||||
});
|
});
|
||||||
|
|
||||||
#if KNOTIFICATIONS_VERSION >= QT_VERSION_CHECK(5, 81, 0)
|
|
||||||
std::unique_ptr<KNotificationReplyAction> replyAction(new KNotificationReplyAction(i18n("Reply")));
|
std::unique_ptr<KNotificationReplyAction> replyAction(new KNotificationReplyAction(i18n("Reply")));
|
||||||
replyAction->setPlaceholderText(i18n("Reply..."));
|
replyAction->setPlaceholderText(i18n("Reply..."));
|
||||||
connect(replyAction.get(), &KNotificationReplyAction::replied, this, [room, replyEventId](const QString &text) {
|
connect(replyAction.get(), &KNotificationReplyAction::replied, this, [room, replyEventId](const QString &text) {
|
||||||
room->postMessage(text, room->preprocessText(text), RoomMessageEvent::MsgType::Text, replyEventId, QString());
|
room->postMessage(text, room->preprocessText(text), RoomMessageEvent::MsgType::Text, replyEventId, QString());
|
||||||
});
|
});
|
||||||
notification->setReplyAction(std::move(replyAction));
|
notification->setReplyAction(std::move(replyAction));
|
||||||
#endif
|
|
||||||
|
|
||||||
notification->sendEvent();
|
notification->sendEvent();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user