Fix error when gmail feed has no messages.

This commit is contained in:
Martin Rotter 2020-08-13 14:39:17 +02:00
parent 252cc59b8d
commit 811d29f643

View File

@ -191,6 +191,7 @@ QList<Message> GmailNetworkFactory::messages(const QString& stream_id, Feed::Sta
QList<Message> more_messages = decodeLiteMessages(messages_data, stream_id, next_page_token);
QList<Message> full_messages;
if (!more_messages.isEmpty()) {
// Now, we via batch HTTP request obtain full data for each message.
bool obtained = obtainAndDecodeFullMessages(more_messages, stream_id, full_messages);
@ -209,6 +210,7 @@ QList<Message> GmailNetworkFactory::messages(const QString& stream_id, Feed::Sta
return messages;
}
}
}
else {
error = Feed::Status::NetworkError;
return messages;