mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Don't check for online status too often.
This commit is contained in:
parent
4fc012b7f8
commit
8f91d3412b
2 changed files with 2 additions and 1 deletions
|
@ -203,9 +203,9 @@ public class NBSyncService extends Service {
|
|||
}
|
||||
|
||||
if (OfflineNow) {
|
||||
OfflineNow = false;
|
||||
NbActivity.updateAllActivities(false);
|
||||
}
|
||||
OfflineNow = false;
|
||||
|
||||
// do this even if background syncs aren't enabled, because it absolutely must happen
|
||||
// on all devices
|
||||
|
|
|
@ -9,6 +9,7 @@ public class NetStateReceiver extends BroadcastReceiver {
|
|||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
// poke the sync service when network state changes, in case we were offline
|
||||
if (!NBSyncService.OfflineNow) return;
|
||||
Intent i = new Intent(context, NBSyncService.class);
|
||||
context.startService(i);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue