mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Block sender only from junk folder
This commit is contained in:
parent
22f162fd60
commit
a39ebe395a
3 changed files with 12 additions and 0 deletions
|
@ -3906,6 +3906,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
aargs.putLong("folder", message.folder);
|
||||
aargs.putString("type", message.folderType);
|
||||
aargs.putString("from", MessageHelper.formatAddresses(message.from));
|
||||
aargs.putBoolean("inJunk", EntityFolder.JUNK.equals(message.folderType));
|
||||
|
||||
FragmentDialogJunk ask = new FragmentDialogJunk();
|
||||
ask.setArguments(aargs);
|
||||
|
@ -6332,6 +6333,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
final long folder = args.getLong("folder");
|
||||
final String type = args.getString("type");
|
||||
final String from = args.getString("from");
|
||||
final boolean inJunk = args.getBoolean("inJunk");
|
||||
|
||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_junk, null);
|
||||
final TextView tvMessage = view.findViewById(R.id.tvMessage);
|
||||
|
@ -6339,6 +6341,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
final CheckBox cbBlockSender = view.findViewById(R.id.cbBlockSender);
|
||||
final CheckBox cbBlockDomain = view.findViewById(R.id.cbBlockDomain);
|
||||
final Button btnEditRules = view.findViewById(R.id.btnEditRules);
|
||||
final Group grpInJunk = view.findViewById(R.id.grpInJunk);
|
||||
|
||||
tvMessage.setText(getString(R.string.title_ask_spam_who, from));
|
||||
|
||||
|
@ -6373,6 +6376,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
}
|
||||
});
|
||||
|
||||
grpInJunk.setVisibility(inJunk ? View.GONE : View.VISIBLE);
|
||||
|
||||
return new AlertDialog.Builder(getContext())
|
||||
.setView(view)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
|
|
|
@ -2225,6 +2225,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
aargs.putLong("folder", message.folder);
|
||||
aargs.putString("type", message.folderType);
|
||||
aargs.putString("from", MessageHelper.formatAddresses(message.from));
|
||||
aargs.putBoolean("inJunk", EntityFolder.JUNK.equals(message.folderType));
|
||||
|
||||
AdapterMessage.FragmentDialogJunk ask = new AdapterMessage.FragmentDialogJunk();
|
||||
ask.setArguments(aargs);
|
||||
|
|
|
@ -83,5 +83,11 @@
|
|||
android:text="@string/title_edit_rules"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBlockHint" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpInJunk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvMessage,tvJunkHint,ibInfo,btnEditRules" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ScrollViewEx>
|
Loading…
Reference in a new issue