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:
parent
8f06dfe254
commit
9762839b78
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user