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

Undo on move selection only

This commit is contained in:
M66B 2019-11-07 10:33:58 +01:00
parent 929d593ee4
commit 7b7942f56c

View file

@ -706,7 +706,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
moveAsk(result);
moveAsk(result, false);
}
@Override
@ -1336,7 +1336,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
moveAsk(result);
moveAsk(result, false);
}
@Override
@ -2229,7 +2229,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (EntityFolder.JUNK.equals(type))
moveAskConfirmed(result);
else
moveAsk(result);
moveAsk(result, true);
}
@Override
@ -2293,7 +2293,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
moveAsk(result);
moveAsk(result, true);
}
@Override
@ -3484,13 +3484,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}.execute(this, args, "messages:navigate");
}
private void moveAsk(final ArrayList<MessageTarget> result) {
private void moveAsk(final ArrayList<MessageTarget> result, boolean undo) {
if (result.size() == 0)
return;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
if (prefs.getBoolean("automove", false)) {
if (undo)
moveUndo(result);
else
moveAskConfirmed(result);
return;
}
@ -4489,7 +4492,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
moveAsk(result);
moveAsk(result, false);
}
@Override