mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 16:43:26 +02:00
Prevent blocking common domain names
This commit is contained in:
@@ -240,6 +240,7 @@ public class ServiceUI extends IntentService {
|
||||
private void onJunk(long id) throws JSONException {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
boolean block_sender = prefs.getBoolean("notify_block_sender", false);
|
||||
List<String> whitelist = EmailProvider.getDomainNames(this);
|
||||
|
||||
DB db = DB.getInstance(this);
|
||||
try {
|
||||
@@ -256,7 +257,7 @@ public class ServiceUI extends IntentService {
|
||||
EntityOperation.queue(this, message, EntityOperation.MOVE, junk.id);
|
||||
|
||||
if (block_sender) {
|
||||
EntityRule rule = EntityRule.blockSender(this, message, junk, false);
|
||||
EntityRule rule = EntityRule.blockSender(this, message, junk, false, whitelist);
|
||||
rule.id = db.rule().insertRule(rule);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user