Refactoring

pull/214/head
M66B 1 year ago
parent 98195890cb
commit 658a484e4f

@ -3733,7 +3733,7 @@ public class FragmentCompose extends FragmentBase {
pgpLoader.serial().execute(this, args, "compose:pgp");
}
private final SimpleTask<Object> pgpLoader = new LoaderComposePgp() {
private final SimpleTask<Object> pgpLoader = new TaskComposePgp() {
@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 LoaderComposeSMime() {
private final SimpleTask<Void> sMimeLoader = new TaskComposeSMime() {
@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:" + LoaderComposeAction.getActionName(action));
actionLoader.execute(this, args, "compose:action:" + TaskComposeAction.getActionName(action));
}
private final SimpleTask<ComposeHelper.DraftData> draftLoader = new LoaderComposeDraft() {
private final SimpleTask<ComposeHelper.DraftData> draftLoader = new TaskComposeDraft() {
@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 LoaderComposeAction() {
private final SimpleTask<EntityMessage> actionLoader = new TaskComposeAction() {
@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=" + LoaderComposeAction.getActionName(action) + " encryption=" + needsEncryption);
" action=" + TaskComposeAction.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 LoaderComposeAction extends SimpleTask<EntityMessage> {
public abstract class TaskComposeAction extends SimpleTask<EntityMessage> {
private static final int MAX_REASONABLE_SIZE = 5 * 1024 * 1024;
@Override
@ -754,15 +754,15 @@ public abstract class LoaderComposeAction extends SimpleTask<EntityMessage> {
}
protected Pair<Integer, List<EntityAttachment>> get() {
throw new NotImplementedException("LoaderAction");
throw new NotImplementedException(this.getClass().getName());
}
protected void set(Integer plain_only, List<EntityAttachment> attachments) {
throw new NotImplementedException("LoaderAction");
throw new NotImplementedException(this.getClass().getName());
}
protected void toast(String feedback) {
throw new NotImplementedException("LoaderAction");
throw new NotImplementedException(this.getClass().getName());
}
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 LoaderComposeDraft extends SimpleTask<ComposeHelper.DraftData> {
public abstract class TaskComposeDraft extends SimpleTask<ComposeHelper.DraftData> {
private static final int MAX_QUOTE_LEVEL = 5;
@Override
@ -974,10 +974,10 @@ public abstract class LoaderComposeDraft extends SimpleTask<ComposeHelper.DraftD
@Override
protected void onException(Bundle args, Throwable ex) {
throw new NotImplementedException("LoaderDraft");
throw new NotImplementedException(this.getClass().getName());
}
protected void set(Integer plain_only, List<EntityAttachment> attachments) {
throw new NotImplementedException("LoaderDraft");
throw new NotImplementedException(this.getClass().getName());
}
}

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

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