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:
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;
|
||||
}
|
||||
|
||||
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");
|
||||
|
|
Loading…
Reference in a new issue