mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 00:23:09 +02:00
Refactoring
This commit is contained in:
@@ -67,7 +67,6 @@ public class FragmentDialogJunk extends FragmentDialogBase {
|
||||
final String type = args.getString("type");
|
||||
final Address[] froms = DB.Converters.decodeAddresses(args.getString("from"));
|
||||
final boolean inJunk = args.getBoolean("inJunk");
|
||||
final boolean canBlock = args.getBoolean("canBlock");
|
||||
|
||||
final Context context = getContext();
|
||||
final View view = LayoutInflater.from(context).inflate(R.layout.dialog_junk, null);
|
||||
@@ -92,6 +91,12 @@ public class FragmentDialogJunk extends FragmentDialogBase {
|
||||
boolean check_blocklist = prefs.getBoolean("check_blocklist", false);
|
||||
boolean use_blocklist = prefs.getBoolean("use_blocklist", false);
|
||||
|
||||
boolean canBlock = false;
|
||||
if (froms != null && froms.length > 0) {
|
||||
String email = ((InternetAddress) froms[0]).getAddress();
|
||||
canBlock = !TextUtils.isEmpty(email);
|
||||
}
|
||||
|
||||
// Wire controls
|
||||
|
||||
ibInfoProvider.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
Reference in New Issue
Block a user