mirror of https://github.com/M66B/FairEmail.git
Background for unread messages
This commit is contained in:
parent
267a4f4bbc
commit
14c5dbd644
4
FAQ.md
4
FAQ.md
|
@ -2891,6 +2891,10 @@ For some background, see for [this Wikipedia article](https://en.wikipedia.org/w
|
|||
|
||||
<br />
|
||||
|
||||
*Background for unread messages*
|
||||
|
||||
<br />
|
||||
|
||||
<a name="faq126"></a>
|
||||
**(126) Can message previews be sent to my wearable?**
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import android.graphics.Paint;
|
|||
import android.graphics.Rect;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.AnimatedImageDrawable;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
@ -223,6 +224,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
private int colorSeparator;
|
||||
private int colorError;
|
||||
private int colorControlNormal;
|
||||
private Drawable drawableSeparator;
|
||||
|
||||
private boolean hasWebView;
|
||||
private boolean pin;
|
||||
|
@ -261,6 +263,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
private boolean collapse_quotes;
|
||||
private boolean authentication;
|
||||
private boolean language_detection;
|
||||
private boolean experiments;
|
||||
private List<String> languages;
|
||||
private static boolean debug;
|
||||
|
||||
|
@ -1388,6 +1391,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
}
|
||||
|
||||
private void bindSeen(TupleMessageEx message) {
|
||||
if (experiments)
|
||||
itemView.setBackground(message.unseen > 0 ? drawableSeparator : null);
|
||||
|
||||
if (textSize != 0) {
|
||||
float fz_sender = (font_size_sender == null ? textSize : font_size_sender) * (message.unseen > 0 ? 1.1f : 1f);
|
||||
float fz_subject = (font_size_subject == null ? textSize : font_size_subject) * 0.9f;
|
||||
|
@ -5328,6 +5334,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
this.colorError = Helper.resolveColor(context, R.attr.colorError);
|
||||
this.colorControlNormal = Helper.resolveColor(context, R.attr.colorControlNormal);
|
||||
|
||||
this.drawableSeparator = new ColorDrawable(colorSeparator);
|
||||
|
||||
this.hasWebView = Helper.hasWebView(context);
|
||||
this.pin = ShortcutManagerCompat.isRequestPinShortcutSupported(context);
|
||||
this.contacts = Helper.hasPermission(context, Manifest.permission.READ_CONTACTS);
|
||||
|
@ -5379,6 +5387,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
this.authentication = prefs.getBoolean("authentication", true);
|
||||
this.language_detection = prefs.getBoolean("language_detection", false);
|
||||
|
||||
this.experiments = prefs.getBoolean("experiments", false);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
languages = new ArrayList<>();
|
||||
LocaleList ll = context.getResources().getConfiguration().getLocales();
|
||||
|
|
Loading…
Reference in New Issue