mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 03:19:24 +01:00
Revert "Always set card background color"
This reverts commit 9ca9a86416.
This commit is contained in:
@@ -37,6 +37,7 @@ public class ViewCardOptional extends CardView {
|
||||
private boolean threading;
|
||||
private int margin;
|
||||
private int ident;
|
||||
private Integer color = null;
|
||||
|
||||
public ViewCardOptional(@NonNull Context context) {
|
||||
super(context);
|
||||
@@ -82,12 +83,16 @@ public class ViewCardOptional extends CardView {
|
||||
|
||||
@Override
|
||||
public void setCardBackgroundColor(int color) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
boolean cards = prefs.getBoolean("cards", true);
|
||||
if (cards && color == Color.TRANSPARENT)
|
||||
color = Helper.resolveColor(getContext(), R.attr.colorCardBackground);
|
||||
if (this.color == null || this.color != color) {
|
||||
this.color = color;
|
||||
|
||||
super.setCardBackgroundColor(color);
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
boolean cards = prefs.getBoolean("cards", true);
|
||||
if (cards && color == Color.TRANSPARENT)
|
||||
color = Helper.resolveColor(getContext(), R.attr.colorCardBackground);
|
||||
|
||||
super.setCardBackgroundColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOutgoing(boolean outgoing) {
|
||||
|
||||
Reference in New Issue
Block a user