Fix error when gmail feed has no messages.
This commit is contained in:
parent
252cc59b8d
commit
811d29f643
1 changed files with 14 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue