Commit 1244b8b5 authored by Martin Straka's avatar Martin Straka

Fixed delete of messages from local database

parent 0f090668
...@@ -87,7 +87,11 @@ void Files::deleteExpiredFilesFromDbs(int days) ...@@ -87,7 +87,11 @@ void Files::deleteExpiredFilesFromDbs(int days)
userName.toUtf8().constData()); userName.toUtf8().constData());
return; return;
} }
const QList<qint64> msgIDList(fDb->cleanFilesInDb(days)); /*
* Files should be deeted from the database with a delay - after
* they have been really deleted from the server.
*/
const QList<qint64> msgIDList(fDb->cleanFilesInDb(days + 1));
if (msgIDList.isEmpty()) { if (msgIDList.isEmpty()) {
continue; continue;
} }
......
...@@ -427,7 +427,11 @@ void Messages::deleteExpiredMessagesFromDbs(int days) ...@@ -427,7 +427,11 @@ void Messages::deleteExpiredMessagesFromDbs(int days)
userName.toUtf8().constData()); userName.toUtf8().constData());
return; return;
} }
msgIDList = msgDb->getExpireMessageListFromDb(days); /*
* Messages should be deeted from the database with a delay -
* after they have been really deleted from the server.
*/
msgIDList = msgDb->getExpireMessageListFromDb(days + 1);
if (msgIDList.isEmpty()) { if (msgIDList.isEmpty()) {
continue; continue;
......
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