mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-28 00:50:26 +01:00
do not download reading-list if only unread msgs are wanted, allow fetching icons on freshrss
This commit is contained in:
parent
a894dcd44f
commit
8a6290e423
@ -164,8 +164,10 @@ void GreaderNetwork::prepareFeedFetching(GreaderServiceRoot* root,
|
|||||||
if (m_performGlobalFetching) {
|
if (m_performGlobalFetching) {
|
||||||
qWarningNN << LOGSEC_GREADER << "Performing global contents fetching.";
|
qWarningNN << LOGSEC_GREADER << "Performing global contents fetching.";
|
||||||
|
|
||||||
auto remote_all_ids_list = itemIds(GREADER_API_FULL_STATE_READING_LIST, false, proxy);
|
QStringList remote_all_ids_list = m_downloadOnlyUnreadMessages
|
||||||
auto remote_unread_ids_list = itemIds(GREADER_API_FULL_STATE_READING_LIST, true, proxy);
|
? QStringList()
|
||||||
|
: itemIds(GREADER_API_FULL_STATE_READING_LIST, false, proxy);
|
||||||
|
QStringList remote_unread_ids_list = itemIds(GREADER_API_FULL_STATE_READING_LIST, true, proxy);
|
||||||
|
|
||||||
for (int i = 0; i < remote_all_ids_list.size(); i++) {
|
for (int i = 0; i < remote_all_ids_list.size(); i++) {
|
||||||
remote_all_ids_list.replace(i, convertShortStreamIdToLongStreamId(remote_all_ids_list.at(i)));
|
remote_all_ids_list.replace(i, convertShortStreamIdToLongStreamId(remote_all_ids_list.at(i)));
|
||||||
@ -227,8 +229,10 @@ QList<Message> GreaderNetwork::getMessagesIntelligently(ServiceRoot* root,
|
|||||||
// 2. Get read IDs for a feed.
|
// 2. Get read IDs for a feed.
|
||||||
// 3. Download messages/contents for missing or changed IDs.
|
// 3. Download messages/contents for missing or changed IDs.
|
||||||
// 4. Add prefetched starred msgs.
|
// 4. Add prefetched starred msgs.
|
||||||
auto remote_all_ids_list = itemIds(stream_id, false, proxy);
|
QStringList remote_all_ids_list = m_downloadOnlyUnreadMessages
|
||||||
auto remote_unread_ids_list = itemIds(stream_id, true, proxy);
|
? QStringList()
|
||||||
|
: itemIds(stream_id, false, proxy);
|
||||||
|
QStringList remote_unread_ids_list = itemIds(stream_id, true, proxy);
|
||||||
|
|
||||||
// Convert item IDs to long form.
|
// Convert item IDs to long form.
|
||||||
for (int i = 0; i < remote_all_ids_list.size(); i++) {
|
for (int i = 0; i < remote_all_ids_list.size(); i++) {
|
||||||
@ -366,7 +370,8 @@ QList<Message> GreaderNetwork::itemContents(ServiceRoot* root, const QList<QStri
|
|||||||
QList<QString> my_stream_ids(stream_ids);
|
QList<QString> my_stream_ids(stream_ids);
|
||||||
|
|
||||||
while (!my_stream_ids.isEmpty()) {
|
while (!my_stream_ids.isEmpty()) {
|
||||||
int batch = m_service == GreaderServiceRoot::Service::TheOldReader
|
int batch = m_service == GreaderServiceRoot::Service::TheOldReader ||
|
||||||
|
m_service == GreaderServiceRoot::Service::FreshRss
|
||||||
? TOR_ITEM_CONTENTS_BATCH
|
? TOR_ITEM_CONTENTS_BATCH
|
||||||
: GREADER_API_ITEM_CONTENTS_BATCH;
|
: GREADER_API_ITEM_CONTENTS_BATCH;
|
||||||
QList<QString> batch_ids = my_stream_ids.mid(0, batch);
|
QList<QString> batch_ids = my_stream_ids.mid(0, batch);
|
||||||
|
@ -223,5 +223,5 @@ void GreaderServiceRoot::updateTitleIcon() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RootItem* GreaderServiceRoot::obtainNewTreeForSyncIn() const {
|
RootItem* GreaderServiceRoot::obtainNewTreeForSyncIn() const {
|
||||||
return m_network->categoriesFeedsLabelsTree(network()->service() != Service::FreshRss, networkProxy());
|
return m_network->categoriesFeedsLabelsTree(true, networkProxy());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user