Subject prefixes fixes

This commit is contained in:
M66B 2021-12-23 16:31:14 +01:00
parent d94c662870
commit 3ec7689042
2 changed files with 3 additions and 2 deletions

View File

@ -722,7 +722,7 @@ public class EntityRule {
String subject = (message.subject == null ? "" : message.subject);
if (prefix_once)
EntityMessage.collapsePrefixes(context, message.language, subject, !TextUtils.isEmpty(to));
subject = EntityMessage.collapsePrefixes(context, message.language, subject, !TextUtils.isEmpty(to));
reply.subject = context.getString(
TextUtils.isEmpty(to)

View File

@ -304,6 +304,7 @@ public class ServiceUI extends IntentService {
private void onReplyDirect(long id, Intent intent) throws IOException {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean prefix_once = prefs.getBoolean("prefix_once", true);
boolean alt_re = prefs.getBoolean("alt_re", false);
boolean plain_only = prefs.getBoolean("plain_only", false);
DB db = DB.getInstance(this);
@ -345,7 +346,7 @@ public class ServiceUI extends IntentService {
reply.thread = ref.thread;
reply.to = ref.from;
reply.from = new Address[]{new InternetAddress(identity.email, identity.name, StandardCharsets.UTF_8.name())};
reply.subject = getString(R.string.title_subject_reply, subject);
reply.subject = getString(alt_re ? R.string.title_subject_reply_alt : R.string.title_subject_reply, subject);
reply.received = new Date().getTime();
reply.seen = true;
reply.ui_seen = true;