[Notifications] Don't sort stopped jobs differently

While this was in principle a good idea to keep active jobs at the top of the
history, it can cause unwanted dialog shifts and dialog recreation when there
are two jobs and the first one finishes and then the second one finishes.
wilder-5.22
Kai Uwe Broulik 5 years ago
parent 76088e21ea
commit 0aecff2095
  1. 11
      libnotificationmanager/notificationsortproxymodel.cpp

@ -71,15 +71,8 @@ int sortScore(const QModelIndex &idx)
return 3;
}
const int type = idx.data(Notifications::TypeRole).toInt();
if (type == Notifications::JobType) {
const int jobState = idx.data(Notifications::JobStateRole).toInt();
// Treat finished jobs as normal notifications but running jobs more important
if (jobState == Notifications::JobStateStopped) {
return 1;
} else {
return 2;
}
if (idx.data(Notifications::TypeRole).toInt() == Notifications::JobType) {
return 2;
}
if (urgency == Notifications::NormalUrgency) {

Loading…
Cancel
Save