fix bad synchronization for greader and also fetching of messages for some specific feeds
This commit is contained in:
parent
684714b8f3
commit
18c3c1b345
|
@ -1 +1 @@
|
|||
Subproject commit 47f4125753452eff8800dbd6600c5a05540b15d9
|
||||
Subproject commit 9c10723bfbaf6cb85107d6ee16e0324e9e487749
|
|
@ -4,8 +4,13 @@
|
|||
#define GREADER_UNLIMITED_BATCH_SIZE -1
|
||||
|
||||
// States.
|
||||
|
||||
// Means "unread" message.
|
||||
#define GREADER_API_STATE_READING_LIST "state/com.google/reading-list"
|
||||
|
||||
// Means "read" message. If both "reading-list" and "read" are specified, message is READ.
|
||||
#define GREADER_API_STATE_READ "state/com.google/read"
|
||||
|
||||
#define GREADER_API_STATE_IMPORTANT "state/com.google/starred"
|
||||
|
||||
#define GREADER_API_FULL_STATE_READING_LIST "user/-/state/com.google/reading-list"
|
||||
|
|
|
@ -106,7 +106,7 @@ QNetworkReply::NetworkError GreaderNetwork::markMessagesStarred(RootItem::Import
|
|||
|
||||
QList<Message> GreaderNetwork::streamContents(ServiceRoot* root, const QString& stream_id,
|
||||
Feed::Status& error, const QNetworkProxy& proxy) {
|
||||
QString full_url = generateFullUrl(Operations::StreamContents).arg(stream_id,
|
||||
QString full_url = generateFullUrl(Operations::StreamContents).arg(QUrl::toPercentEncoding(stream_id),
|
||||
QString::number(batchSize() <= 0
|
||||
? 2000000
|
||||
: batchSize()));
|
||||
|
@ -532,11 +532,11 @@ QList<Message> GreaderNetwork::decodeStreamContents(ServiceRoot* root,
|
|||
for (const QJsonValue& cat : categories) {
|
||||
QString category = cat.toString();
|
||||
|
||||
if (category.contains(GREADER_API_STATE_READ)) {
|
||||
message.m_isRead = !category.contains(GREADER_API_STATE_READING_LIST);
|
||||
if (category.endsWith(GREADER_API_STATE_READ)) {
|
||||
message.m_isRead = true;
|
||||
}
|
||||
else if (category.contains(GREADER_API_STATE_IMPORTANT)) {
|
||||
message.m_isImportant = category.contains(GREADER_API_STATE_IMPORTANT);
|
||||
else if (category.endsWith(GREADER_API_STATE_IMPORTANT)) {
|
||||
message.m_isImportant = true;
|
||||
}
|
||||
else if (category.contains(QSL("label"))) {
|
||||
Label* label = boolinq::from(active_labels.begin(), active_labels.end()).firstOrDefault([category](Label* lbl) {
|
||||
|
|
Loading…
Reference in New Issue