mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 08:40:03 +02:00
fix issue #995 - Don't display translate popup if there is only one choice
This commit is contained in:
parent
cf01ee77e1
commit
4c911705ab
1 changed files with 6 additions and 1 deletions
|
@ -79,8 +79,13 @@ public class TranslateHelper {
|
|||
|
||||
Set<String> translates = sharedpreferences.getStringSet(context.getString(R.string.SET_LIVE_TRANSLATE_MULTIPLE), null);
|
||||
String translate;
|
||||
if (translates == null || translates.size() == 0) {
|
||||
if (translates == null || translates.size() <= 1) {
|
||||
translate = MyTransL.getLocale();
|
||||
if(translates != null && translates.size() == 1 ) {
|
||||
for (String val : translates) {
|
||||
translate = val;
|
||||
}
|
||||
}
|
||||
myTransL.translate(statusToTranslate, translate, params, new Results() {
|
||||
@Override
|
||||
public void onSuccess(com.github.stom79.mytransl.translate.Translate translate) {
|
||||
|
|
Loading…
Reference in a new issue