mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-18 21:28:54 +00:00
Improved logging
This commit is contained in:
parent
09d8930303
commit
ca9379c8d8
1 changed files with 15 additions and 5 deletions
|
@ -4038,13 +4038,23 @@ class Core {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
boolean uidplus = MessageHelper.hasCapability(ifolder, "UIDPLUS");
|
boolean uidplus = MessageHelper.hasCapability(ifolder, "UIDPLUS");
|
||||||
String count = (uidplus ? messages.size() : "all") + "messages";
|
if (uidplus) {
|
||||||
Log.i(ifolder.getName() + " expunging " + count);
|
List<Long> uids = new ArrayList<>();
|
||||||
if (uidplus)
|
for (Message m : messages)
|
||||||
|
try {
|
||||||
|
uids.add(ifolder.getUID(m));
|
||||||
|
} catch (MessagingException ex) {
|
||||||
|
uids.add(-1L);
|
||||||
|
}
|
||||||
|
Log.i(ifolder.getName() + " expunging " + TextUtils.join(",", uids));
|
||||||
ifolder.expunge(messages.toArray(new Message[0]));
|
ifolder.expunge(messages.toArray(new Message[0]));
|
||||||
else
|
Log.i(ifolder.getName() + " expunged " + TextUtils.join(",", uids));
|
||||||
|
} else {
|
||||||
|
Log.i(ifolder.getName() + " expunging all");
|
||||||
ifolder.expunge();
|
ifolder.expunge();
|
||||||
Log.i(ifolder.getName() + " expunged " + count);
|
Log.i(ifolder.getName() + " expunged all");
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (MessagingException ex) {
|
} catch (MessagingException ex) {
|
||||||
// NO EXPUNGE failed.
|
// NO EXPUNGE failed.
|
||||||
|
|
Loading…
Reference in a new issue