Refactoring

This commit is contained in:
M66B
2021-12-24 14:00:12 +01:00
parent 69c8a2a356
commit 68bdc75c2b
4 changed files with 54 additions and 101 deletions

View File

@@ -303,8 +303,6 @@ 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);
@@ -321,10 +319,6 @@ public class ServiceUI extends IntentService {
if (outbox == null)
throw new IllegalArgumentException("outbox not found");
String subject = (ref.subject == null ? "" : ref.subject);
if (prefix_once)
subject = EntityMessage.collapsePrefixes(this, ref.language, subject, false);
Bundle results = RemoteInput.getResultsFromIntent(intent);
String body = results.getString("text");
if (body != null)
@@ -346,7 +340,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(alt_re ? R.string.title_subject_reply_alt : R.string.title_subject_reply, subject);
reply.subject = EntityMessage.getSubject(this, ref.language, ref.subject, false);
reply.received = new Date().getTime();
reply.seen = true;
reply.ui_seen = true;