Skip to content

Commit

Permalink
Merge branch 'jb51671-action-changes' into 'master'
Browse files Browse the repository at this point in the history
[transfer-engine] Avoid excessive notification action updates. JB#51671

See merge request mer-core/transfer-engine!20
  • Loading branch information
blam committed Oct 27, 2020
2 parents 1c01b59 + c20bc4d commit 32f1029
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/transferengine.cpp
Expand Up @@ -434,7 +434,11 @@ void TransferEnginePrivate::sendNotification(TransferEngineData::TransferType ty
useProgress = true;

if (canCancel) {
remoteActions.append(Notification::remoteAction(QString(),
// Use a constant action name instead of an auto-generated one which is different
// every time, to avoid excessive changes to the action data which disrupts the UI.
static const QString cancelActionName = QStringLiteral("transferengine_cancel_transfer");

remoteActions.append(Notification::remoteAction(cancelActionName,
//: Cancel the file transfer
//% "Cancel"
qtTrId("transferengine-no-cancel"),
Expand Down

0 comments on commit 32f1029

Please sign in to comment.