1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix batches bigger than limit on import

This commit is contained in:
tux3 2015-12-19 04:40:31 +01:00
parent 8f06dfe254
commit 9762839b78
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -219,7 +219,7 @@ void History::import(const HistoryKeeper &oldHistory)
for (const HistoryKeeper::HistMessage& msg : oldMessages)
{
queries += generateNewMessageQueries(msg.chat, msg.message, msg.sender, msg.timestamp, true, msg.dispName);
if (queries.size() == batchSize)
if (queries.size() >= batchSize)
{
db.execLater(queries);
queries.clear();