mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Fixed edge case
This commit is contained in:
parent
a5ec0f9f0f
commit
3447bf0236
3 changed files with 3 additions and 2 deletions
|
@ -159,7 +159,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
|||
ivState.setImageResource(R.drawable.baseline_close_24);
|
||||
else
|
||||
ivState.setImageResource(R.drawable.baseline_cloud_off_24);
|
||||
ivState.setVisibility(account.synchronize ? View.VISIBLE : View.INVISIBLE);
|
||||
ivState.setVisibility(account.synchronize || account.state != null ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
tvHost.setText(String.format("%s:%d", account.host, account.port));
|
||||
tvLast.setText(context.getString(R.string.title_last_connected,
|
||||
|
|
|
@ -265,6 +265,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|||
" stop=" + prev.canRun() +
|
||||
" start=" + current.canRun() +
|
||||
" changed=" + !prev.accountState.equals(current.accountState) +
|
||||
" enabled=" + current.accountState.synchronize +
|
||||
" state=" + current.accountState.state +
|
||||
" type=" + prev.networkState.getType() + "/" + current.networkState.getType());
|
||||
if (prev.canRun())
|
||||
|
|
|
@ -53,6 +53,6 @@ public class TupleAccountState extends EntityAccount {
|
|||
}
|
||||
|
||||
boolean shouldRun(boolean enabled) {
|
||||
return (isEnabled(enabled) || operations > 0);
|
||||
return (isEnabled(enabled) || (operations > 0 && synchronize));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue