Skip to content

Commit 944b874

Browse files
Revert "Setting Switch state not visible properly in Dark AMOLED basic theme" (#3100)
This reverts commit 06ad137.
1 parent 06ad137 commit 944b874

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

app/src/main/java/org/fossasia/phimpme/gallery/util/ThemeHelper.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,6 @@ public int getBackgroundColor() {
125125
return color;
126126
}
127127

128-
public int getUpdatedSwitchColor() {
129-
int color;
130-
switch (baseTheme) {
131-
case DARK_THEME:
132-
color = getColor(R.color.md_dark_background);
133-
break;
134-
case AMOLED_THEME:
135-
color = getColor(R.color.md_blue_grey_900);
136-
break;
137-
case LIGHT_THEME:
138-
default:
139-
color = getColor(R.color.md_light_background);
140-
}
141-
return color;
142-
}
143-
144128
public int getInvertedBackgroundColor() {
145129
int color;
146130
switch (baseTheme) {
@@ -363,7 +347,7 @@ public void updateSwitchColor(SwitchCompat sw, int color) {
363347
.setColorFilter(sw.isChecked() ? color : getSubTextColor(), PorterDuff.Mode.MULTIPLY);
364348
sw.getTrackDrawable()
365349
.setColorFilter(
366-
sw.isChecked() ? ColorPalette.getTransparentColor(color, 100) : getUpdatedSwitchColor(),
350+
sw.isChecked() ? ColorPalette.getTransparentColor(color, 100) : getBackgroundColor(),
367351
PorterDuff.Mode.MULTIPLY);
368352
}
369353

0 commit comments

Comments
 (0)