Change msg update logic a bit.
This commit is contained in:
parent
d9757f2814
commit
d24f249788
@ -215,12 +215,11 @@ int Feed::updateMessages(const QList<Message>& messages, bool error_during_obtai
|
|||||||
|
|
||||||
qDebug("Updating messages in DB. Main thread: '%s'.", qPrintable(is_main_thread ? "true" : "false"));
|
qDebug("Updating messages in DB. Main thread: '%s'.", qPrintable(is_main_thread ? "true" : "false"));
|
||||||
|
|
||||||
if (!messages.isEmpty()) {
|
|
||||||
bool anything_updated = false;
|
bool anything_updated = false;
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
|
|
||||||
if (!messages.isEmpty()) {
|
if (!messages.isEmpty()) {
|
||||||
qDebug("There are some messages to be updated in DB.");
|
qDebug("There are some messages to be updated/added to DB.");
|
||||||
|
|
||||||
QString custom_id = customId();
|
QString custom_id = customId();
|
||||||
int account_id = getParentServiceRoot()->accountId();
|
int account_id = getParentServiceRoot()->accountId();
|
||||||
@ -240,7 +239,6 @@ int Feed::updateMessages(const QList<Message>& messages, bool error_during_obtai
|
|||||||
items_to_update.append(getParentServiceRoot()->recycleBin());
|
items_to_update.append(getParentServiceRoot()->recycleBin());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (error_during_obtaining) {
|
if (error_during_obtaining) {
|
||||||
qCritical("There is indication that there was error during messages obtaining.");
|
qCritical("There is indication that there was error during messages obtaining.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user