mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-18 21:28:54 +00:00
Update network state on force sync
This commit is contained in:
parent
d198e9f5f1
commit
ecd5baa66c
1 changed files with 3 additions and 6 deletions
|
@ -275,11 +275,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reload && force) {
|
|
||||||
Log.i("### update network state " + current);
|
|
||||||
current.networkState = ConnectionHelper.getNetworkState(ServiceSynchronize.this);
|
|
||||||
}
|
|
||||||
|
|
||||||
TupleAccountNetworkState prev = accountStates.get(index);
|
TupleAccountNetworkState prev = accountStates.get(index);
|
||||||
Core.State state = coreStates.get(current.accountState.id);
|
Core.State state = coreStates.get(current.accountState.id);
|
||||||
if (state != null)
|
if (state != null)
|
||||||
|
@ -864,8 +859,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
|
|
||||||
private void onReload(Intent intent) {
|
private void onReload(Intent intent) {
|
||||||
boolean force = intent.getBooleanExtra("force", false);
|
boolean force = intent.getBooleanExtra("force", false);
|
||||||
if (force)
|
if (force) {
|
||||||
lastLost = 0;
|
lastLost = 0;
|
||||||
|
updateNetworkState(ConnectionHelper.getActiveNetwork(this), "force");
|
||||||
|
}
|
||||||
|
|
||||||
Bundle command = new Bundle();
|
Bundle command = new Bundle();
|
||||||
command.putString("name", "reload");
|
command.putString("name", "reload");
|
||||||
|
|
Loading…
Reference in a new issue