1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 18:27:43 +00:00

Hide language when no detection

This commit is contained in:
M66B 2020-03-27 18:07:21 +01:00
parent 3267eaead5
commit bea4dc52b0

View file

@ -243,6 +243,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private boolean inline;
private boolean collapse_quotes;
private boolean authentication;
private boolean language_detection;
private static boolean debug;
private boolean gotoTop = false;
@ -1423,8 +1424,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
.append(message.total == null ? "-" : Helper.humanReadableByteCount(message.total, true));
tvSizeEx.setText(size.toString());
tvLanguageTitle.setVisibility(show_addresses && message.language != null ? View.VISIBLE : View.GONE);
tvLanguage.setVisibility(show_addresses && message.language != null ? View.VISIBLE : View.GONE);
tvLanguageTitle.setVisibility(
show_addresses && language_detection && message.language != null
? View.VISIBLE : View.GONE);
tvLanguage.setVisibility(
show_addresses && language_detection && message.language != null
? View.VISIBLE : View.GONE);
tvLanguage.setText(message.language == null ? null : new Locale(message.language).getDisplayLanguage());
tvSubjectEx.setVisibility(show_addresses ? View.VISIBLE : View.GONE);
@ -4580,6 +4585,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
this.inline = prefs.getBoolean("inline_images", false);
this.collapse_quotes = prefs.getBoolean("collapse_quotes", false);
this.authentication = prefs.getBoolean("authentication", true);
this.language_detection = prefs.getBoolean("language_detection", false);
debug = prefs.getBoolean("debug", false);