Commit 0aecff20 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[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.
parent 76088e21
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment