mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-06-02 19:36:30 +02:00
I'm already sick of this shitty code π
This commit is contained in:
parent
7dd6a28c3f
commit
2a1916bf6e
|
@ -244,7 +244,7 @@ public class Settings extends BaseSettings {
|
|||
public static final LongSetting SWIPE_OVERLAY_TIMEOUT = new LongSetting("revanced_swipe_overlay_timeout", 500L, true,
|
||||
parentsAny(SWIPE_BRIGHTNESS, SWIPE_VOLUME));
|
||||
public static final BooleanSetting SWIPE_SAVE_AND_RESTORE_BRIGHTNESS = new BooleanSetting("revanced_swipe_save_and_restore_brightness", TRUE, true, parent(SWIPE_BRIGHTNESS));
|
||||
public static final FloatSetting SWIPE_BRIGHTNESS_VALUE = new FloatSetting("revanced_swipe_brightness_value", -1f);
|
||||
public static final FloatSetting SWIPE_BRIGHTNESS_VALUE = new FloatSetting("revanced_swipe_brightness_value", 0.5f);
|
||||
public static final BooleanSetting SWIPE_ENABLE_LOWEST_VALUE_AUTO_BRIGHTNESS = new BooleanSetting("revanced_swipe_enable_lowest_value_auto_brightness", TRUE, true, parent(SWIPE_BRIGHTNESS));
|
||||
// Debugging
|
||||
/**
|
||||
|
|
|
@ -50,9 +50,12 @@ class ScreenBrightnessController(
|
|||
* restore the screen brightness from settings saved using [save]
|
||||
*/
|
||||
fun restore() {
|
||||
// after force close app, 'savedScreenBrightnessValue' resets to default from settings ('0.5f').
|
||||
// so default value in settings should not be '-1f'
|
||||
// `-1f` means auto-brightness activated
|
||||
if (config.savedScreenBrightnessValue != -1f) {
|
||||
rawScreenBrightness = config.savedScreenBrightnessValue
|
||||
config.savedScreenBrightnessValue = -1f // Reset the saved brightness value
|
||||
config.savedScreenBrightnessValue = -1f
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loadingβ¦
Reference in New Issue
Block a user