Skip grouping DSNs

pull/194/merge
M66B 4 years ago
parent cca9ab4347
commit ba140e543e

@ -1337,16 +1337,23 @@ public class MessageHelper {
boolean subject_threading = prefs.getBoolean("subject_threading", false); boolean subject_threading = prefs.getBoolean("subject_threading", false);
if (subject_threading) { if (subject_threading) {
String sender = getSortKey(getFrom()); boolean dsn = false;
String subject = getSubject(); try {
long since = new Date().getTime() - MAX_SUBJECT_AGE * 3600 * 1000L; dsn = imessage.isMimeType("multipart/report");
if (!TextUtils.isEmpty(sender) && !TextUtils.isEmpty(subject)) { } catch (Throwable ignored) {
List<EntityMessage> subjects = db.message().getMessagesBySubject(account, sender, subject, since); }
for (EntityMessage message : subjects) if (!dsn) {
if (!thread.equals(message.thread)) { String sender = getSortKey(getFrom());
Log.w("Updating subject thread from " + message.thread + " to " + thread); String subject = getSubject();
db.message().updateMessageThread(message.account, message.thread, thread, since); long since = new Date().getTime() - MAX_SUBJECT_AGE * 3600 * 1000L;
} if (!TextUtils.isEmpty(sender) && !TextUtils.isEmpty(subject)) {
List<EntityMessage> subjects = db.message().getMessagesBySubject(account, sender, subject, since);
for (EntityMessage message : subjects)
if (!thread.equals(message.thread)) {
Log.w("Updating subject thread from " + message.thread + " to " + thread);
db.message().updateMessageThread(message.account, message.thread, thread, since);
}
}
} }
} }

Loading…
Cancel
Save