Mark outbox messages read on sent

This commit is contained in:
M66B
2018-08-06 18:11:24 +00:00
parent 409a9f5b3c
commit b50646d05e
3 changed files with 18 additions and 5 deletions

View File

@@ -790,7 +790,9 @@ public class ServiceSynchronize extends LifecycleService {
Log.i(Helper.TAG, "Sent via " + ident.host + "/" + ident.user +
" to " + TextUtils.join(", ", to));
msg.ui_hide = true;
msg.sent = new Date().getTime();
msg.seen = true;
msg.ui_seen = true;
message.updateMessage(msg);
// TODO: purge sent messages
} finally {
@@ -860,6 +862,12 @@ public class ServiceSynchronize extends LifecycleService {
// Response codes: https://www.ietf.org/rfc/rfc821.txt
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
// There is probably no use in repeating
operation.deleteOperation(op.id);
reportError(null, folder.name, ex);
} catch (NullPointerException ex) {
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
// There is probably no use in repeating
operation.deleteOperation(op.id);
reportError(null, folder.name, ex);