Revert "Refactoring"

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

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

@ -62,7 +62,7 @@ import javax.mail.Session;
import javax.mail.internet.AddressException;
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;
@Override
@ -754,15 +754,15 @@ public abstract class TaskComposeAction extends SimpleTask<EntityMessage> {
}
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) {
throw new NotImplementedException(this.getClass().getName());
throw new NotImplementedException("LoaderAction");
}
protected void toast(String feedback) {
throw new NotImplementedException(this.getClass().getName());
throw new NotImplementedException("LoaderAction");
}
private void checkAddress(InternetAddress[] addresses, Context context) throws AddressException {

@ -55,7 +55,7 @@ import biweekly.ICalendar;
import biweekly.component.VEvent;
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;
@Override
@ -974,10 +974,10 @@ public abstract class TaskComposeDraft extends SimpleTask<ComposeHelper.DraftDat
@Override
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) {
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.MimeUtility;
public class TaskComposePgp extends SimpleTask<Object> {
public class LoaderComposePgp extends SimpleTask<Object> {
private String[] pgpUserIds;
private long[] pgpKeyIds;
private long pgpSignKeyId;
@ -380,6 +380,6 @@ public class TaskComposePgp extends SimpleTask<Object> {
@Override
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.util.ByteArrayDataSource;
public class TaskComposeSMime extends SimpleTask<Void> {
public class LoaderComposeSMime extends SimpleTask<Void> {
@Override
protected Void onExecute(Context context, Bundle args) throws Throwable {
long id = args.getLong("id");
Loading…
Cancel
Save