mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 17:43:18 +02:00
Use generic bg executor for LT and DeepL
This commit is contained in:
@@ -2756,6 +2756,8 @@ public class FragmentCompose extends FragmentBase {
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, DeepL.Translation translation) {
|
||||
if (etSubject == null)
|
||||
return;
|
||||
etSubject.setText(translation.translated_text);
|
||||
}
|
||||
|
||||
@@ -2763,7 +2765,7 @@ public class FragmentCompose extends FragmentBase {
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Log.unexpectedError(getParentFragmentManager(), ex, !(ex instanceof IOException));
|
||||
}
|
||||
}.serial().execute(FragmentCompose.this, args, "compose:translate");
|
||||
}.execute(FragmentCompose.this, args, "compose:translate");
|
||||
} else {
|
||||
final Pair<Integer, Integer> paragraph = StyleHelper.getParagraph(etBody);
|
||||
if (paragraph == null)
|
||||
@@ -2890,7 +2892,7 @@ public class FragmentCompose extends FragmentBase {
|
||||
etBody.setSelection(paragraph.second);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex, !(ex instanceof IOException));
|
||||
}
|
||||
}.serial().execute(FragmentCompose.this, args, "compose:translate");
|
||||
}.execute(FragmentCompose.this, args, "compose:translate");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -2970,7 +2972,7 @@ public class FragmentCompose extends FragmentBase {
|
||||
Log.unexpectedError(getParentFragmentManager(), exex, false);
|
||||
}
|
||||
}
|
||||
}.serial().execute(this, args, "compose:lt");
|
||||
}.execute(this, args, "compose:lt");
|
||||
}
|
||||
|
||||
private void onActionRecordAudio() {
|
||||
|
||||
Reference in New Issue
Block a user