Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b6534794 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Check date validity before comparing it

Prevents it from treating items with unknown date to be newer than anything else.

BUG: 388521

Differential Revision: https://phabricator.kde.org/D9654
parent a7bf8026
......@@ -2758,11 +2758,13 @@ ModelPrivate::ViewItemJobResult ModelPrivate::viewItemJobStepInternalForJobPass1
}
// Update the newest/oldest message, since we might be supposed to select those later
if (!mOldestItem || mOldestItem->date() > mi->date()) {
mOldestItem = mi;
}
if (!mNewestItem || mNewestItem->date() < mi->date()) {
mNewestItem = mi;
if (mi->date() != static_cast<uint>(-1)) {
if (!mOldestItem || mOldestItem->date() > mi->date()) {
mOldestItem = mi;
}
if (!mNewestItem || mNewestItem->date() < mi->date()) {
mNewestItem = mi;
}
}
// Ok.. it passed the initial checks: we will not be discarding it.
......
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