1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Synchronize now: force reload

This commit is contained in:
M66B 2024-01-25 14:35:42 +01:00
parent a35fcd876e
commit 37462d7da1

View file

@ -829,12 +829,14 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
private void onActionSync(boolean children) { private void onActionSync(boolean children) {
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putLong("folder", folder.id); args.putLong("folder", folder.id);
args.putLong("account", folder.account);
args.putBoolean("children", children); args.putBoolean("children", children);
new SimpleTask<Void>() { new SimpleTask<Void>() {
@Override @Override
protected Void onExecute(Context context, Bundle args) { protected Void onExecute(Context context, Bundle args) {
long fid = args.getLong("folder"); long fid = args.getLong("folder");
long aid = args.getLong("account");
boolean children = args.getBoolean("children"); boolean children = args.getBoolean("children");
if (!ConnectionHelper.getNetworkState(context).isSuitable()) if (!ConnectionHelper.getNetworkState(context).isSuitable())
@ -873,7 +875,10 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
db.endTransaction(); db.endTransaction();
} }
ServiceSynchronize.eval(context, "refresh/folder"); if (children)
ServiceSynchronize.eval(context, "refresh/folder");
else
ServiceSynchronize.reload(context, aid, true, "refresh/folder");
if (!now) if (!now)
throw new IllegalArgumentException(context.getString(R.string.title_no_connection)); throw new IllegalArgumentException(context.getString(R.string.title_no_connection));