Skip to content

Commit

Permalink
Always convert the first notification link to action button.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila <[email protected]>
  • Loading branch information
Camila committed May 12, 2022
1 parent dac4aca commit a0f94ed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui/tray/activitylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,15 +767,16 @@ QVariantList ActivityListModel::convertLinksToActionButtons(const Activity &acti
return customList;
}

if (static_cast<quint32>(activity._links.size()) > maxActionButtons()) {
if (activity._links.size() > 0) {
customList << ActivityListModel::convertLinkToActionButton(activity._links.first());
return customList;
}

for (const auto &activityLink : activity._links) {
if (activityLink._verb == QStringLiteral("DELETE")
|| (activity._objectType == QStringLiteral("chat") || activity._objectType == QStringLiteral("call")
|| activity._objectType == QStringLiteral("room"))) {
|| (activityLink._verb != QStringLiteral("REPLY")
&& (activity._objectType == QStringLiteral("chat")
|| activity._objectType == QStringLiteral("call")
|| activity._objectType == QStringLiteral("room")))) {
customList << ActivityListModel::convertLinkToActionButton(activityLink);
}
}
Expand Down

0 comments on commit a0f94ed

Please sign in to comment.