Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[transfer-engine] Ensure group notification is published with the cor…
…rect preview body.

MNotificationGroup::publish() sets its x-nemo-preview-body field
using the preview body of the last added notification group. This
means if the group is published before the notification, the
preview body used will be that of the last published notification
group instead of the current one.

If the group is published after the notification instead, the
notification will ensure the group properties are set correctly
before the group is published.
  • Loading branch information
Bea Lam committed Oct 2, 2013
1 parent 5f442cd commit eed7c4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transferengine.cpp
Expand Up @@ -412,12 +412,12 @@ void TransferEnginePrivate::sendNotification(TransferEngineData::TransferType ty
group->setAction(rAct);
}

// always publish the group to make updates appear
group->publish();

notification.setGroup(*group);
notification.publish();

// always publish the group to make updates appear
group->publish();

// Cleanup
if (groups.count()) {
qDeleteAll(groups);
Expand Down

0 comments on commit eed7c4b

Please sign in to comment.