Warn for blocking common domains

This commit is contained in:
M66B
2021-10-12 09:20:47 +02:00
parent af54166a8a
commit 4599a373aa
4 changed files with 40 additions and 15 deletions

View File

@@ -252,7 +252,6 @@ 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 {
@@ -269,7 +268,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, whitelist);
EntityRule rule = EntityRule.blockSender(this, message, junk, false);
if (rule != null)
rule.id = db.rule().insertRule(rule);
}