mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Stop pre-caching images if disallowed network becomes active.
This commit is contained in:
parent
d1e5f24e39
commit
b063d819d5
1 changed files with 4 additions and 1 deletions
|
@ -32,7 +32,10 @@ public class ImagePrefetchService extends SubService {
|
|||
|
||||
gotWork();
|
||||
|
||||
while ((ImageQueue.size() > 0) && PrefsUtils.isImagePrefetchEnabled(parent)) {
|
||||
while (ImageQueue.size() > 0) {
|
||||
if (! PrefsUtils.isImagePrefetchEnabled(parent)) return;
|
||||
if (! PrefsUtils.isBackgroundNetworkAllowed(parent)) return;
|
||||
|
||||
startExpensiveCycle();
|
||||
// on each batch, re-query the DB for images associated with yet-unread stories
|
||||
// this is a bit expensive, but we are running totally async at a really low priority
|
||||
|
|
Loading…
Add table
Reference in a new issue