Commit 81e89f1e authored by Kristopher Ives's avatar Kristopher Ives Committed by Nate Graham

[POTD] Actually update the image every day

Summary:
This patch adjusts the dirty condition so that the image is actually updated once a day, not once every two days.

BUG: 397914
FIXED-IN: 5.12.7

Test Plan: Applied patch, set a POTD wallpaper, waited one day, noticed that the image had changed.

Reviewers: #plasma, kossebau, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15124
parent 07653934
......@@ -101,7 +101,7 @@ bool CachedProvider::isCached( const QString &identifier, bool ignoreAge )
if (!ignoreAge && !identifier.contains( ':' ) ) {
// no date in the identifier, so it's a daily; check to see ifthe modification time is today
QFileInfo info( path );
if ( info.lastModified().daysTo( QDateTime::currentDateTime() ) > 1 ) {
if ( info.lastModified().daysTo( QDateTime::currentDateTime() ) >= 1 ) {
return false;
}
}
......
......@@ -186,7 +186,7 @@ void PotdEngine::checkDayChanged()
updateSourceEvent( it.key() );
} else {
QFileInfo info( path );
if ( info.lastModified().daysTo( QDateTime::currentDateTime() ) > 1 ) {
if ( info.lastModified().daysTo( QDateTime::currentDateTime() ) >= 1 ) {
updateSourceEvent( it.key() );
}
}
......
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