mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-10 19:13:03 +02:00
Added manage filters/contacts to spam dialog
This commit is contained in:
@@ -83,6 +83,14 @@ public class FragmentContacts extends FragmentBase {
|
||||
private static final int REQUEST_EXPORT = 3;
|
||||
static final int REQUEST_EDIT_NAME = 4;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Bundle args = getArguments();
|
||||
this.junk = (args != null && args.getBoolean("junk"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
||||
@@ -82,6 +82,8 @@ public class FragmentDialogJunk extends FragmentDialogBase {
|
||||
final TextView tvBlocklist = view.findViewById(R.id.tvBlocklist);
|
||||
final ImageButton ibInfoBlocklist = view.findViewById(R.id.ibInfoBlocklist);
|
||||
final Button btnClear = view.findViewById(R.id.btnClear);
|
||||
final ImageButton ibRules = view.findViewById(R.id.ibRules);
|
||||
final ImageButton ibManage = view.findViewById(R.id.ibManage);
|
||||
final Group grpInJunk = view.findViewById(R.id.grpInJunk);
|
||||
final Group grpMore = view.findViewById(R.id.grpMore);
|
||||
|
||||
@@ -271,6 +273,38 @@ public class FragmentDialogJunk extends FragmentDialogBase {
|
||||
}
|
||||
});
|
||||
|
||||
ibRules.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(v.getContext());
|
||||
lbm.sendBroadcast(
|
||||
new Intent(ActivityView.ACTION_EDIT_RULES)
|
||||
.putExtra("account", account)
|
||||
.putExtra("protocol", protocol)
|
||||
.putExtra("folder", folder)
|
||||
.putExtra("type", type));
|
||||
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
ibManage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean("junk", true);
|
||||
|
||||
FragmentContacts fragment = new FragmentContacts();
|
||||
fragment.setArguments(args);
|
||||
|
||||
FragmentTransaction fragmentTransaction = getParentFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("contacts");
|
||||
fragmentTransaction.commit();
|
||||
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
boolean common = false;
|
||||
Address[] froms = InternetAddress.parseHeader(from, false);
|
||||
|
||||
Reference in New Issue
Block a user