Revert "Refactoring"

This reverts commit 658a484e4f.
pull/214/head
M66B 1 year ago
parent ce8cfc8fad
commit 89bb923ad5

@ -3733,7 +3733,7 @@ public class FragmentCompose extends FragmentBase {
pgpLoader.serial().execute(this, args, "compose:pgp"); pgpLoader.serial().execute(this, args, "compose:pgp");
} }
private final SimpleTask<Object> pgpLoader = new TaskComposePgp() { private final SimpleTask<Object> pgpLoader = new LoaderComposePgp() {
@Override @Override
protected void onPreExecute(Bundle args) { protected void onPreExecute(Bundle args) {
setBusy(true); setBusy(true);
@ -3804,7 +3804,7 @@ public class FragmentCompose extends FragmentBase {
sMimeLoader.serial().execute(this, args, "compose:s/mime"); sMimeLoader.serial().execute(this, args, "compose:s/mime");
} }
private final SimpleTask<Void> sMimeLoader = new TaskComposeSMime() { private final SimpleTask<Void> sMimeLoader = new LoaderComposeSMime() {
@Override @Override
protected void onPreExecute(Bundle args) { protected void onPreExecute(Bundle args) {
setBusy(true); setBusy(true);
@ -4259,10 +4259,10 @@ public class FragmentCompose extends FragmentBase {
args.putBundle("extras", extras); args.putBundle("extras", extras);
Log.i("Run execute id=" + working + " reason=" + reason); Log.i("Run execute id=" + working + " reason=" + reason);
actionLoader.execute(this, args, "compose:action:" + TaskComposeAction.getActionName(action)); actionLoader.execute(this, args, "compose:action:" + LoaderComposeAction.getActionName(action));
} }
private final SimpleTask<ComposeHelper.DraftData> draftLoader = new TaskComposeDraft() { private final SimpleTask<ComposeHelper.DraftData> draftLoader = new LoaderComposeDraft() {
@Override @Override
protected void onExecuted(Bundle args, final ComposeHelper.DraftData data) { protected void onExecuted(Bundle args, final ComposeHelper.DraftData data) {
final String action = getArguments().getString("action"); final String action = getArguments().getString("action");
@ -4614,7 +4614,7 @@ public class FragmentCompose extends FragmentBase {
} }
}.serial(); }.serial();
private final SimpleTask<EntityMessage> actionLoader = new TaskComposeAction() { private final SimpleTask<EntityMessage> actionLoader = new LoaderComposeAction() {
@Override @Override
protected void onPreExecute(Bundle args) { protected void onPreExecute(Bundle args) {
if (args.getBundle("extras").getBoolean("silent")) if (args.getBundle("extras").getBoolean("silent"))
@ -4653,7 +4653,7 @@ public class FragmentCompose extends FragmentBase {
boolean needsEncryption = args.getBoolean("needsEncryption"); boolean needsEncryption = args.getBoolean("needsEncryption");
int action = args.getInt("action"); int action = args.getInt("action");
Log.i("Loaded action id=" + draft.id + Log.i("Loaded action id=" + draft.id +
" action=" + TaskComposeAction.getActionName(action) + " encryption=" + needsEncryption); " action=" + LoaderComposeAction.getActionName(action) + " encryption=" + needsEncryption);
int toPos = etTo.getSelectionStart(); int toPos = etTo.getSelectionStart();
int ccPos = etCc.getSelectionStart(); int ccPos = etCc.getSelectionStart();

@ -62,7 +62,7 @@ import javax.mail.Session;
import javax.mail.internet.AddressException; import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress; import javax.mail.internet.InternetAddress;
public abstract class TaskComposeAction extends SimpleTask<EntityMessage> { public abstract class LoaderComposeAction extends SimpleTask<EntityMessage> {
private static final int MAX_REASONABLE_SIZE = 5 * 1024 * 1024; private static final int MAX_REASONABLE_SIZE = 5 * 1024 * 1024;
@Override @Override
@ -754,15 +754,15 @@ public abstract class TaskComposeAction extends SimpleTask<EntityMessage> {
} }
protected Pair<Integer, List<EntityAttachment>> get() { protected Pair<Integer, List<EntityAttachment>> get() {
throw new NotImplementedException(this.getClass().getName()); throw new NotImplementedException("LoaderAction");
} }
protected void set(Integer plain_only, List<EntityAttachment> attachments) { protected void set(Integer plain_only, List<EntityAttachment> attachments) {
throw new NotImplementedException(this.getClass().getName()); throw new NotImplementedException("LoaderAction");
} }
protected void toast(String feedback) { protected void toast(String feedback) {
throw new NotImplementedException(this.getClass().getName()); throw new NotImplementedException("LoaderAction");
} }
private void checkAddress(InternetAddress[] addresses, Context context) throws AddressException { private void checkAddress(InternetAddress[] addresses, Context context) throws AddressException {

@ -55,7 +55,7 @@ import biweekly.ICalendar;
import biweekly.component.VEvent; import biweekly.component.VEvent;
import biweekly.property.Organizer; import biweekly.property.Organizer;
public abstract class TaskComposeDraft extends SimpleTask<ComposeHelper.DraftData> { public abstract class LoaderComposeDraft extends SimpleTask<ComposeHelper.DraftData> {
private static final int MAX_QUOTE_LEVEL = 5; private static final int MAX_QUOTE_LEVEL = 5;
@Override @Override
@ -974,10 +974,10 @@ public abstract class TaskComposeDraft extends SimpleTask<ComposeHelper.DraftDat
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
throw new NotImplementedException(this.getClass().getName()); throw new NotImplementedException("LoaderDraft");
} }
protected void set(Integer plain_only, List<EntityAttachment> attachments) { protected void set(Integer plain_only, List<EntityAttachment> attachments) {
throw new NotImplementedException(this.getClass().getName()); throw new NotImplementedException("LoaderDraft");
} }
} }

@ -56,7 +56,7 @@ import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeUtility; import javax.mail.internet.MimeUtility;
public class TaskComposePgp extends SimpleTask<Object> { public class LoaderComposePgp extends SimpleTask<Object> {
private String[] pgpUserIds; private String[] pgpUserIds;
private long[] pgpKeyIds; private long[] pgpKeyIds;
private long pgpSignKeyId; private long pgpSignKeyId;
@ -380,6 +380,6 @@ public class TaskComposePgp extends SimpleTask<Object> {
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
throw new NotImplementedException(this.getClass().getName()); throw new NotImplementedException("LoaderDraft");
} }
} }

@ -79,7 +79,7 @@ import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart; import javax.mail.internet.MimeMultipart;
import javax.mail.util.ByteArrayDataSource; import javax.mail.util.ByteArrayDataSource;
public class TaskComposeSMime extends SimpleTask<Void> { public class LoaderComposeSMime extends SimpleTask<Void> {
@Override @Override
protected Void onExecute(Context context, Bundle args) throws Throwable { protected Void onExecute(Context context, Bundle args) throws Throwable {
long id = args.getLong("id"); long id = args.getLong("id");
Loading…
Cancel
Save