mirror of https://github.com/M66B/FairEmail.git
Reduced logging
This commit is contained in:
parent
b8ef3357be
commit
2ab67dfe64
|
@ -6405,8 +6405,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
protected Void onExecute(Context context, Bundle args) {
|
protected Void onExecute(Context context, Bundle args) {
|
||||||
long aid = args.getLong("account");
|
long aid = args.getLong("account");
|
||||||
String type = args.getString("type");
|
String type = args.getString("type");
|
||||||
EntityLog.log(context, "Empty" +
|
EntityLog.log(context, "Empty account=" + account + " type=" + type);
|
||||||
" account=" + account + " type=" + type);
|
|
||||||
|
|
||||||
DB db = DB.getInstance(context);
|
DB db = DB.getInstance(context);
|
||||||
try {
|
try {
|
||||||
|
@ -6424,19 +6423,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
|
|
||||||
for (EntityAccount account : accounts) {
|
for (EntityAccount account : accounts) {
|
||||||
EntityFolder folder = db.folder().getFolderByType(account.id, type);
|
EntityFolder folder = db.folder().getFolderByType(account.id, type);
|
||||||
EntityLog.log(context, "Empty" +
|
EntityLog.log(context,
|
||||||
" account=" + account.name + " folder=" + (folder == null ? null : folder.name));
|
"Empty account=" + account.name + " folder=" + (folder == null ? null : folder.name));
|
||||||
if (folder == null)
|
if (folder == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
List<Long> ids = db.message().getMessageByFolder(folder.id);
|
List<Long> ids = db.message().getMessageByFolder(folder.id);
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
EntityMessage message = db.message().getMessage(id);
|
EntityMessage message = db.message().getMessage(id);
|
||||||
EntityLog.log(context, "Empty" +
|
if (message != null &&
|
||||||
" account=" + account.name + " folder=" + folder.name +
|
(message.uid != null || !TextUtils.isEmpty(message.msgid))) {
|
||||||
" message=" + message.id + " uid=" + message.uid + " msgid=" + message.msgid);
|
|
||||||
|
|
||||||
if (message.uid != null || !TextUtils.isEmpty(message.msgid)) {
|
|
||||||
Log.i("Deleting account=" + account.id + " folder=" + folder.id + " message=" + message.id);
|
Log.i("Deleting account=" + account.id + " folder=" + folder.id + " message=" + message.id);
|
||||||
EntityOperation.queue(context, message, EntityOperation.DELETE);
|
EntityOperation.queue(context, message, EntityOperation.DELETE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue