Susimail: Fix loading mail bodies in non-inbox/drafts folders

This commit is contained in:
zzz
2024-04-05 16:37:00 -04:00
parent bbf1e41a7b
commit 06302c0f31
3 changed files with 6 additions and 7 deletions

View File

@@ -359,16 +359,13 @@ class MailCache {
}
if (mail.markForDeletion)
return null;
// if not in inbox, we can't fetch, this is what we have
if (mailbox == null)
return mail;
long sz = mail.getSize();
if (mode == FetchMode.HEADER && sz > 0 && sz <= FETCH_ALL_SIZE)
mode = FetchMode.ALL;
if (mode == FetchMode.HEADER) {
if (!mail.hasHeader()) {
if (!mail.hasHeader() && mailbox != null) {
if (_log.shouldInfo()) _log.info("Fetching mail header from server for b64: " + Base64.encode(uidl));
Buffer buf = mailbox.getHeader(uidl);
if (buf != null)
@@ -396,7 +393,7 @@ class MailCache {
} else {
if (_log.shouldWarn()) _log.warn("We do not have body in disk cache for b64: " + Base64.encode(uidl));
}
if (mode == FetchMode.ALL) {
if (mode == FetchMode.ALL && mailbox != null) {
if (_log.shouldInfo()) _log.info("Fetching mail body from server for b64: " + Base64.encode(uidl));
File file = new File(_context.getTempDir(), "susimail-new-" + _context.random().nextLong());
Buffer rb = mailbox.getBody(uidl, new FileBuffer(file));

View File

@@ -1,5 +1,7 @@
2024-04-05 zzz
* Susimail: Fix truncation of quoted-printable encoded attachments
* Susimail:
- Fix truncation of quoted-printable encoded attachments
- Fix loading mail bodies in non-inbox/drafts folders
* Translation updates
2024-04-04 zzz

View File

@@ -20,7 +20,7 @@ public class RouterVersion {
public final static String VERSION = CoreVersion.VERSION;
/** for example: "beta", "alpha", "rc" */
public final static String QUALIFIER = "rc";
public final static long BUILD = 9;
public final static long BUILD = 10;
/** for example "-test" */
public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + QUALIFIER + EXTRA;