From e4a0d57bc8abed89425eefd4ffd4e349e35cbc9e Mon Sep 17 00:00:00 2001 From: Camila Date: Thu, 12 May 2022 12:43:03 +0200 Subject: [PATCH] Do not replace strings in action links coming from the notification api. Signed-off-by: Camila --- src/gui/tray/activitylistmodel.cpp | 4 ---- test/testactivitylistmodel.cpp | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index 6d412f67de4e4..8ffd65077b375 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -798,10 +798,6 @@ QVariant ActivityListModel::convertLinkToActionButton(const OCC::ActivityLink &a QString(replyButtonPath + "/" + OCC::Theme::instance()->wizardHeaderTitleColor().name()); } - if (activityLink._verb == QStringLiteral("DELETE")) { - activityLinkCopy._label = QObject::tr("Mark as read"); - } - return QVariant::fromValue(activityLinkCopy); } diff --git a/test/testactivitylistmodel.cpp b/test/testactivitylistmodel.cpp index 027a84956fadc..17c5de729ad79 100644 --- a/test/testactivitylistmodel.cpp +++ b/test/testactivitylistmodel.cpp @@ -705,10 +705,10 @@ private slots: // in case total actions is longer than ActivityListModel::maxActionButtons, then a sum of action buttons and action menu entries must be equal to a total of action links QVERIFY(actionButtonsLinks.size() + actionsLinksContextMenu.size() == actionsLinks.size()); } else { - // in case a total of actions is less or equal to than ActivityListModel::maxActionButtons, then the length of action buttons must be greater than 1 and should contain "Mark as read" button at the end + // in case a total of actions is less or equal to than ActivityListModel::maxActionButtons, then the length of action buttons must be greater than 1 and should contain "Dismiss" button at the end QVERIFY(actionButtonsLinks.size() > 1); QVERIFY(actionButtonsLinks[1].value()._label - == QObject::tr("Mark as read")); + == QObject::tr("Dismiss")); } } else if ((objectType == QStringLiteral("call"))) { QVERIFY(