mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-27 08:01:50 +01:00
Background sync, simplifications
This commit is contained in:
@@ -399,21 +399,5 @@ public class FragmentSetup extends FragmentBase {
|
||||
tvPermissionsDone.setTextColor(has ? textColorPrimary : colorWarning);
|
||||
tvPermissionsDone.setCompoundDrawablesWithIntrinsicBounds(has ? check : null, null, null, null);
|
||||
btnPermissions.setEnabled(!has);
|
||||
|
||||
if (has && !init)
|
||||
new SimpleTask<Void>() {
|
||||
@Override
|
||||
protected Void onExecute(Context context, Bundle args) {
|
||||
DB db = DB.getInstance(context);
|
||||
for (EntityFolder folder : db.folder().getSynchronizingFolders())
|
||||
EntityOperation.sync(context, folder.id);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
||||
}
|
||||
}.execute(FragmentSetup.this, new Bundle(), "setup:sync");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user