mirror of https://github.com/M66B/FairEmail.git
Revert "Always set card background color"
This reverts commit 9ca9a86416
.
This commit is contained in:
parent
9ca9a86416
commit
59bd4ec833
|
@ -37,6 +37,7 @@ public class ViewCardOptional extends CardView {
|
||||||
private boolean threading;
|
private boolean threading;
|
||||||
private int margin;
|
private int margin;
|
||||||
private int ident;
|
private int ident;
|
||||||
|
private Integer color = null;
|
||||||
|
|
||||||
public ViewCardOptional(@NonNull Context context) {
|
public ViewCardOptional(@NonNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
@ -82,6 +83,9 @@ public class ViewCardOptional extends CardView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCardBackgroundColor(int color) {
|
public void setCardBackgroundColor(int color) {
|
||||||
|
if (this.color == null || this.color != color) {
|
||||||
|
this.color = color;
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||||
boolean cards = prefs.getBoolean("cards", true);
|
boolean cards = prefs.getBoolean("cards", true);
|
||||||
if (cards && color == Color.TRANSPARENT)
|
if (cards && color == Color.TRANSPARENT)
|
||||||
|
@ -89,6 +93,7 @@ public class ViewCardOptional extends CardView {
|
||||||
|
|
||||||
super.setCardBackgroundColor(color);
|
super.setCardBackgroundColor(color);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setOutgoing(boolean outgoing) {
|
public void setOutgoing(boolean outgoing) {
|
||||||
if (cards && threading && indentation) {
|
if (cards && threading && indentation) {
|
||||||
|
|
Loading…
Reference in New Issue