Create more than one converted activity link, therby respecting maxactionbuttons

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-07-05 23:32:46 +08:00
parent fe59d4ec79
commit 12931069c0
No known key found for this signature in database
GPG Key ID: C839200C384636B0

View File

@ -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;