CurlHandler: Fix downloading any number of emails.

This commit is contained in:
Timothée Leclaire-Fournier 2024-03-08 21:40:34 -05:00
parent 0f160a1f63
commit 25d5bd12f8

View File

@ -47,7 +47,7 @@ std::vector<std::string> *CurlHandler::fetch() {
decodedMessages.resize(messagesId.size());
count = 0;
for (auto i{messagesId.rbegin()}; i != messagesId.rbegin() + 5; i++)
for (auto i{messagesId.rbegin()}; i != messagesId.rbegin() + 10 && i != messagesId.rend(); i++)
v.emplace_back(&CurlHandler::query, this, std::ref(*i), count++);
return &decodedMessages;