mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
67d5cb97e3
commit
74fa856ff0
|
@ -6527,7 +6527,18 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleTask<Void> move = new SimpleTask<Void>() {
|
String title = getString(R.string.title_move_undo, getNames(result, true), result.size());
|
||||||
|
((ActivityView) activity).undo(title, args, taskUndoMove, taskUndoShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onException(Bundle args, Throwable ex) {
|
||||||
|
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||||
|
}
|
||||||
|
}.execute(this, args, "undo:hide");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final SimpleTask<Void> taskUndoMove = new SimpleTask<Void>() {
|
||||||
@Override
|
@Override
|
||||||
protected Void onExecute(Context context, Bundle args) {
|
protected Void onExecute(Context context, Bundle args) {
|
||||||
ArrayList<MessageTarget> result = args.getParcelableArrayList("result");
|
ArrayList<MessageTarget> result = args.getParcelableArrayList("result");
|
||||||
|
@ -6563,7 +6574,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleTask<Void> show = new SimpleTask<Void>() {
|
private static final SimpleTask<Void> taskUndoShow = new SimpleTask<Void>() {
|
||||||
@Override
|
@Override
|
||||||
protected Void onExecute(Context context, Bundle args) {
|
protected Void onExecute(Context context, Bundle args) {
|
||||||
ArrayList<MessageTarget> result = args.getParcelableArrayList("result");
|
ArrayList<MessageTarget> result = args.getParcelableArrayList("result");
|
||||||
|
@ -6594,17 +6605,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
String title = getString(R.string.title_move_undo, getNames(result, true), result.size());
|
|
||||||
((ActivityView) activity).undo(title, args, move, show);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onException(Bundle args, Throwable ex) {
|
|
||||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
|
||||||
}
|
|
||||||
}.execute(this, args, "undo:hide");
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String getNames(ArrayList<MessageTarget> result, boolean dest) {
|
private static String getNames(ArrayList<MessageTarget> result, boolean dest) {
|
||||||
boolean across = false;
|
boolean across = false;
|
||||||
for (MessageTarget target : result)
|
for (MessageTarget target : result)
|
||||||
|
|
Loading…
Reference in New Issue