Small improvement

pull/162/head
M66B 5 years ago
parent 5400ccc746
commit e3e7130ea8

@ -354,6 +354,9 @@ public interface DaoMessage {
@Query("UPDATE message SET notifying = :notifying WHERE id = :id") @Query("UPDATE message SET notifying = :notifying WHERE id = :id")
int setMessageNotifying(long id, int notifying); int setMessageNotifying(long id, int notifying);
@Query("UPDATE message SET received = :received WHERE id = :id")
int setMessageReceived(long id, long received);
@Query("UPDATE message SET seen = :seen WHERE id = :id") @Query("UPDATE message SET seen = :seen WHERE id = :id")
int setMessageSeen(long id, boolean seen); int setMessageSeen(long id, boolean seen);

@ -2665,7 +2665,6 @@ public class FragmentCompose extends FragmentBase {
draft.bcc = abcc; draft.bcc = abcc;
draft.subject = subject; draft.subject = subject;
draft.encrypt = encrypt; draft.encrypt = encrypt;
draft.received = new Date().getTime();
draft.sender = MessageHelper.getSortKey(draft.from); draft.sender = MessageHelper.getSortKey(draft.from);
Uri lookupUri = ContactInfo.getLookupUri(context, draft.from); Uri lookupUri = ContactInfo.getLookupUri(context, draft.from);
draft.avatar = (lookupUri == null ? null : lookupUri.toString()); draft.avatar = (lookupUri == null ? null : lookupUri.toString());
@ -2725,6 +2724,11 @@ public class FragmentCompose extends FragmentBase {
} }
} }
if (dirty) {
draft.received = new Date().getTime();
db.message().setMessageReceived(draft.id, draft.received);
}
// Remove unused inline images // Remove unused inline images
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(body); sb.append(body);

Loading…
Cancel
Save