mirror of https://github.com/M66B/FairEmail.git
Undo on move selection only
This commit is contained in:
parent
929d593ee4
commit
7b7942f56c
|
@ -706,7 +706,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
|
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
|
||||||
moveAsk(result);
|
moveAsk(result, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1336,7 +1336,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
|
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
|
||||||
moveAsk(result);
|
moveAsk(result, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2229,7 +2229,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
if (EntityFolder.JUNK.equals(type))
|
if (EntityFolder.JUNK.equals(type))
|
||||||
moveAskConfirmed(result);
|
moveAskConfirmed(result);
|
||||||
else
|
else
|
||||||
moveAsk(result);
|
moveAsk(result, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2293,7 +2293,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
|
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
|
||||||
moveAsk(result);
|
moveAsk(result, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3484,13 +3484,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
}.execute(this, args, "messages:navigate");
|
}.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)
|
if (result.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||||
if (prefs.getBoolean("automove", false)) {
|
if (prefs.getBoolean("automove", false)) {
|
||||||
|
if (undo)
|
||||||
moveUndo(result);
|
moveUndo(result);
|
||||||
|
else
|
||||||
|
moveAskConfirmed(result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4489,7 +4492,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
|
protected void onExecuted(Bundle args, ArrayList<MessageTarget> result) {
|
||||||
moveAsk(result);
|
moveAsk(result, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue