1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-31 20:25:38 +00:00

Update network state on force sync

This commit is contained in:
M66B 2021-01-16 18:15:45 +01:00
parent d198e9f5f1
commit ecd5baa66c

View file

@ -275,11 +275,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
break;
}
if (reload && force) {
Log.i("### update network state " + current);
current.networkState = ConnectionHelper.getNetworkState(ServiceSynchronize.this);
}
TupleAccountNetworkState prev = accountStates.get(index);
Core.State state = coreStates.get(current.accountState.id);
if (state != null)
@ -864,8 +859,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
private void onReload(Intent intent) {
boolean force = intent.getBooleanExtra("force", false);
if (force)
if (force) {
lastLost = 0;
updateNetworkState(ConnectionHelper.getActiveNetwork(this), "force");
}
Bundle command = new Bundle();
command.putString("name", "reload");