Refactoring

This commit is contained in:
M66B
2021-12-31 15:38:29 +01:00
parent 5a8ae39fa3
commit 496a865e57
3 changed files with 6 additions and 15 deletions

View File

@@ -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() {