mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-04 11:54:10 +01:00
Fixed typeface warnings on some Samsung devices
This commit is contained in:
@@ -132,7 +132,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
||||
else
|
||||
tvName.setText(account.name);
|
||||
|
||||
tvName.setTypeface(null, account.unseen > 0 ? Typeface.BOLD : Typeface.NORMAL);
|
||||
tvName.setTypeface(account.unseen > 0 ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
|
||||
tvName.setTextColor(account.unseen > 0 ? colorUnread : textColorSecondary);
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
else
|
||||
tvName.setText(folder.getDisplayName(context, parent));
|
||||
|
||||
tvName.setTypeface(null, folder.unseen > 0 ? Typeface.BOLD : Typeface.NORMAL);
|
||||
tvName.setTypeface(folder.unseen > 0 ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
|
||||
tvName.setTextColor(folder.unseen > 0 ? colorUnread : textColorSecondary);
|
||||
|
||||
if (listener == null) {
|
||||
|
||||
@@ -570,12 +570,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
}
|
||||
|
||||
// Unseen
|
||||
int typeface = (message.unseen > 0 ? Typeface.BOLD : Typeface.NORMAL);
|
||||
tvFrom.setTypeface(null, typeface);
|
||||
tvSize.setTypeface(null, typeface);
|
||||
tvTime.setTypeface(null, typeface);
|
||||
tvSubject.setTypeface(null, typeface | (subject_italic ? Typeface.ITALIC : 0));
|
||||
tvCount.setTypeface(null, typeface);
|
||||
Typeface typeface = (message.unseen > 0 ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
|
||||
tvFrom.setTypeface(typeface);
|
||||
tvSize.setTypeface(typeface);
|
||||
tvTime.setTypeface(typeface);
|
||||
if (subject_italic)
|
||||
if (message.unseen > 0)
|
||||
tvSubject.setTypeface(null, Typeface.BOLD_ITALIC);
|
||||
else
|
||||
tvSubject.setTypeface(null, Typeface.ITALIC);
|
||||
else
|
||||
tvSubject.setTypeface(typeface);
|
||||
tvCount.setTypeface(typeface);
|
||||
|
||||
int colorUnseen = (message.unseen > 0 ? colorUnread : textColorSecondary);
|
||||
tvFrom.setTextColor(colorUnseen);
|
||||
@@ -937,7 +943,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
|
||||
tvSubjectEx.setVisibility(show_addresses ? View.VISIBLE : View.GONE);
|
||||
tvSubjectEx.setText(message.subject);
|
||||
tvSubjectEx.setTypeface(null, subject_italic ? Typeface.ITALIC : Typeface.NORMAL);
|
||||
if (subject_italic)
|
||||
tvSubjectEx.setTypeface(Typeface.DEFAULT, Typeface.ITALIC);
|
||||
else
|
||||
tvSubjectEx.setTypeface(Typeface.DEFAULT);
|
||||
|
||||
// Flags
|
||||
tvFlags.setVisibility(show_addresses && debug ? View.VISIBLE : View.GONE);
|
||||
|
||||
Reference in New Issue
Block a user