Changeset View
Changeset View
Standalone View
Standalone View
libnotificationmanager/notifications.cpp
Show First 20 Lines • Show All 270 Lines • ▼ Show 20 Line(s) | 263 | for (int i = 0; i < filterModel->rowCount(); ++i) { | |||
---|---|---|---|---|---|
271 | 271 | | |||
272 | QDateTime date = idx.data(Notifications::UpdatedRole).toDateTime(); | 272 | QDateTime date = idx.data(Notifications::UpdatedRole).toDateTime(); | ||
273 | if (!date.isValid()) { | 273 | if (!date.isValid()) { | ||
274 | date = idx.data(Notifications::CreatedRole).toDateTime(); | 274 | date = idx.data(Notifications::CreatedRole).toDateTime(); | ||
275 | } | 275 | } | ||
276 | 276 | | |||
277 | // TODO Jobs could also be unread? | 277 | // TODO Jobs could also be unread? | ||
278 | if (notificationsModel) { | 278 | if (notificationsModel) { | ||
279 | if (date > notificationsModel->lastRead()) { | 279 | if (!active && date > notificationsModel->lastRead()) { | ||
280 | ++unread; | 280 | ++unread; | ||
281 | } | 281 | } | ||
282 | } | 282 | } | ||
283 | 283 | | |||
284 | if (idx.data(Notifications::TypeRole).toInt() == Notifications::JobType) { | 284 | if (idx.data(Notifications::TypeRole).toInt() == Notifications::JobType) { | ||
285 | if (idx.data(Notifications::JobStateRole).toInt() != Notifications::JobStateStopped) { | 285 | if (idx.data(Notifications::JobStateRole).toInt() != Notifications::JobStateStopped) { | ||
286 | ++jobs; | 286 | ++jobs; | ||
287 | 287 | | |||
▲ Show 20 Lines • Show All 563 Lines • Show Last 20 Lines |