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

Refactoring

This commit is contained in:
M66B 2023-03-27 18:03:32 +02:00
parent 16c007905b
commit 55b97da356
6 changed files with 10 additions and 11 deletions

View file

@ -2140,7 +2140,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
args.putString("title", getString(R.string.title_select));
args.putLongArray("disabled", new long[0]);
FragmentDialogFolder fragment = new FragmentDialogFolder();
FragmentDialogSelectFolder fragment = new FragmentDialogSelectFolder();
fragment.setArguments(args);
fragment.setTargetActivity(this, REQUEST_RULES_FOLDER);
fragment.show(getSupportFragmentManager(), "rules:folder");

View file

@ -5664,7 +5664,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
args.putBoolean("cancopy", true);
args.putBoolean("similar", false);
FragmentDialogFolder fragment = new FragmentDialogFolder();
FragmentDialogSelectFolder fragment = new FragmentDialogSelectFolder();
fragment.setArguments(args);
fragment.setTargetFragment(parentFragment, FragmentMessages.REQUEST_MESSAGE_MOVE);
fragment.show(parentFragment.getParentFragmentManager(), "message:move");

View file

@ -468,7 +468,7 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
args.putLongArray("disabled", new long[]{rule.folder});
args.putLong("rule", rule.id);
FragmentDialogFolder fragment = new FragmentDialogFolder();
FragmentDialogSelectFolder fragment = new FragmentDialogSelectFolder();
fragment.setArguments(args);
fragment.setTargetFragment(parentFragment, FragmentRules.REQUEST_MOVE);
fragment.show(parentFragment.getParentFragmentManager(), "rule:move");

View file

@ -60,7 +60,6 @@ import org.json.JSONException;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
@ -71,7 +70,7 @@ import java.util.Map;
import javax.mail.internet.InternetAddress;
public class FragmentDialogFolder extends FragmentDialogBase {
public class FragmentDialogSelectFolder extends FragmentDialogBase {
private int result = 0;
private AdapterFolder adapter;
private LinearLayoutManager llm;
@ -309,7 +308,7 @@ public class FragmentDialogFolder extends FragmentDialogBase {
FragmentDialogEditName fragment = new FragmentDialogEditName();
fragment.setArguments(args);
fragment.setTargetFragment(FragmentDialogFolder.this, REQUEST_FOLDER_NAME);
fragment.setTargetFragment(FragmentDialogSelectFolder.this, REQUEST_FOLDER_NAME);
fragment.show(getParentFragmentManager(), "folder:name");
}
});

View file

@ -1771,7 +1771,7 @@ public class FragmentMessages extends FragmentBase
aargs.putLongArray("disabled", new long[]{});
aargs.putSerializable("criteria", criteria);
FragmentDialogFolder fragment = new FragmentDialogFolder();
FragmentDialogSelectFolder fragment = new FragmentDialogSelectFolder();
fragment.setArguments(aargs);
fragment.setTargetFragment(FragmentMessages.this, REQUEST_SEARCH);
fragment.show(getParentFragmentManager(), "messages:search");
@ -2122,7 +2122,7 @@ public class FragmentMessages extends FragmentBase
args.putBoolean("filter_archive", filter_archive);
args.putLongArray("disabled", new long[]{folder});
FragmentDialogFolder fragment = new FragmentDialogFolder();
FragmentDialogSelectFolder fragment = new FragmentDialogSelectFolder();
fragment.setArguments(args);
fragment.setTargetFragment(FragmentMessages.this, REQUEST_THREAD_MOVE);
fragment.show(getParentFragmentManager(), "overscroll:move");
@ -3234,7 +3234,7 @@ public class FragmentMessages extends FragmentBase
args.putBoolean("copy", false);
args.putBoolean("similar", true);
FragmentDialogFolder fragment = new FragmentDialogFolder();
FragmentDialogSelectFolder fragment = new FragmentDialogSelectFolder();
fragment.setArguments(args);
fragment.setTargetFragment(FragmentMessages.this, REQUEST_MESSAGE_MOVE);
fragment.show(getParentFragmentManager(), "swipe:move");
@ -4418,7 +4418,7 @@ public class FragmentMessages extends FragmentBase
args.putLongArray("disabled", Helper.toLongArray(disabled));
args.putLongArray("messages", getSelection());
FragmentDialogFolder fragment = new FragmentDialogFolder();
FragmentDialogSelectFolder fragment = new FragmentDialogSelectFolder();
fragment.setArguments(args);
fragment.setTargetFragment(FragmentMessages.this, REQUEST_MESSAGES_MOVE);
fragment.show(getParentFragmentManager(), "messages:move");

View file

@ -536,7 +536,7 @@ public class FragmentRule extends FragmentBase {
args.putLong("account", account);
args.putLongArray("disabled", new long[]{});
FragmentDialogFolder fragment = new FragmentDialogFolder();
FragmentDialogSelectFolder fragment = new FragmentDialogSelectFolder();
fragment.setArguments(args);
fragment.setTargetFragment(FragmentRule.this, REQUEST_FOLDER);
fragment.show(getParentFragmentManager(), "rule:folder");