mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Unhide message on failure
This is faster than fetching again
This commit is contained in:
parent
c28a6669fd
commit
763f084a4a
1 changed files with 22 additions and 20 deletions
|
@ -3006,28 +3006,30 @@ class Core {
|
|||
}
|
||||
|
||||
if ((message.size != null && message.size < maxSize) ||
|
||||
(MessageClassifier.isEnabled(context)) && folder.auto_classify_source) {
|
||||
String body = parts.getHtml(context);
|
||||
File file = message.getFile(context);
|
||||
Helper.writeText(file, body);
|
||||
db.message().setMessageContent(message.id,
|
||||
true,
|
||||
HtmlHelper.getLanguage(context, body),
|
||||
parts.isPlainOnly(),
|
||||
HtmlHelper.getPreview(body),
|
||||
parts.getWarnings(message.warning));
|
||||
MessageClassifier.classify(message, folder, null, context);
|
||||
if (!message.ui_hide)
|
||||
db.message().setMessageUiHide(message.id, false);
|
||||
(MessageClassifier.isEnabled(context)) && folder.auto_classify_source)
|
||||
try {
|
||||
String body = parts.getHtml(context);
|
||||
File file = message.getFile(context);
|
||||
Helper.writeText(file, body);
|
||||
db.message().setMessageContent(message.id,
|
||||
true,
|
||||
HtmlHelper.getLanguage(context, body),
|
||||
parts.isPlainOnly(),
|
||||
HtmlHelper.getPreview(body),
|
||||
parts.getWarnings(message.warning));
|
||||
MessageClassifier.classify(message, folder, null, context);
|
||||
|
||||
if (stats != null && body != null)
|
||||
stats.content += body.length();
|
||||
Log.i(folder.name + " inline downloaded message id=" + message.id +
|
||||
" size=" + message.size + "/" + (body == null ? null : body.length()));
|
||||
if (stats != null && body != null)
|
||||
stats.content += body.length();
|
||||
Log.i(folder.name + " inline downloaded message id=" + message.id +
|
||||
" size=" + message.size + "/" + (body == null ? null : body.length()));
|
||||
|
||||
if (TextUtils.isEmpty(body) && parts.hasBody())
|
||||
reportEmptyMessage(context, state, account, istore);
|
||||
}
|
||||
if (TextUtils.isEmpty(body) && parts.hasBody())
|
||||
reportEmptyMessage(context, state, account, istore);
|
||||
} finally {
|
||||
if (!message.ui_hide)
|
||||
db.message().setMessageUiHide(message.id, false);
|
||||
}
|
||||
}
|
||||
|
||||
reportNewMessage(context, account, folder, message);
|
||||
|
|
Loading…
Reference in a new issue