From 12931069c021edda9ce418c38f36094e5af658a1 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 5 Jul 2023 23:32:46 +0800 Subject: [PATCH] Create more than one converted activity link, therby respecting maxactionbuttons Signed-off-by: Claudio Cambra --- src/gui/tray/activitylistmodel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index 87df7e1b6b..4dab1d8ae2 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -870,12 +870,13 @@ QVariantList ActivityListModel::convertLinksToActionButtons(const Activity &acti QVariantList customList; for (const auto &activityLink : activity._links) { - if (!activityLink._primary) { + // Use the isDismissable model role to present custom dismiss button if needed + // Also don't show "View chat" for talk activities, default action will open chat anyway + if (activityLink._verb == "DELETE" || (activityLink._verb == "WEB" && activity._objectType == "chat")) { continue; } customList << ActivityListModel::convertLinkToActionButton(activityLink); - break; } return customList;