mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-01 00:02:55 +01:00
fix(youtube/theme): fix app crash if user clears seekbar color (#390)
This commit is contained in:
parent
2882ec1c9c
commit
e2f52905dc
@ -13,6 +13,9 @@ public final class ThemePatch {
|
||||
SettingsEnum.SEEKBAR_COLOR.saveValue(SettingsEnum.SEEKBAR_COLOR.defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
*/
|
||||
public static int getSeekbarClickedColorValue(final int colorValue) {
|
||||
// YouTube uses a specific color when the seekbar is clicked. Override in that case.
|
||||
return colorValue == ORIGINAL_SEEKBAR_CLICKED_COLOR ? getSeekbarColorValue() : colorValue;
|
||||
@ -21,7 +24,7 @@ public final class ThemePatch {
|
||||
public static int getSeekbarColorValue() {
|
||||
try {
|
||||
return Color.parseColor(SettingsEnum.SEEKBAR_COLOR.getString());
|
||||
} catch (IllegalArgumentException exception) {
|
||||
} catch (Exception exception) {
|
||||
resetSeekbarColor();
|
||||
return getSeekbarColorValue();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user