mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-11 19:43:11 +02:00
Batch folder download
This commit is contained in:
@@ -623,6 +623,7 @@ public class FragmentFolders extends FragmentBase {
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_folder_all, null);
|
||||
final CheckBox cbPoll = view.findViewById(R.id.cbPoll);
|
||||
final CheckBox cbDownload = view.findViewById(R.id.cbDownload);
|
||||
final EditText etSyncDays = view.findViewById(R.id.etSyncDays);
|
||||
final EditText etKeepDays = view.findViewById(R.id.etKeepDays);
|
||||
final CheckBox cbKeepAll = view.findViewById(R.id.cbKeepAll);
|
||||
@@ -641,6 +642,7 @@ public class FragmentFolders extends FragmentBase {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Bundle args = getArguments();
|
||||
args.putBoolean("poll", cbPoll.isChecked());
|
||||
args.putBoolean("download", cbDownload.isChecked());
|
||||
args.putString("sync", etSyncDays.getText().toString());
|
||||
args.putString("keep", cbKeepAll.isChecked()
|
||||
? Integer.toString(Integer.MAX_VALUE)
|
||||
@@ -651,6 +653,7 @@ public class FragmentFolders extends FragmentBase {
|
||||
protected Void onExecute(Context context, Bundle args) throws Throwable {
|
||||
long account = args.getLong("account");
|
||||
boolean poll = args.getBoolean("poll");
|
||||
boolean download = args.getBoolean("download");
|
||||
String sync = args.getString("sync");
|
||||
String keep = args.getString("keep");
|
||||
|
||||
@@ -663,6 +666,7 @@ public class FragmentFolders extends FragmentBase {
|
||||
db.folder().setFolderProperties(
|
||||
account,
|
||||
poll,
|
||||
download,
|
||||
Integer.parseInt(sync),
|
||||
Integer.parseInt(keep));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user