This commit is contained in:
MarcaDian 2024-04-08 22:52:35 +03:00
parent 00e396aaaa
commit f5ef01d363
No known key found for this signature in database
GPG Key ID: 904EF10755E7C016
2 changed files with 5 additions and 1 deletions

View File

@ -245,6 +245,7 @@ public class Settings extends BaseSettings {
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", 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));
public static final BooleanSetting SWIPE_AUTO_BRIGHTNESS_STATE = new BooleanSetting("revanced_swipe_auto_brightness_state", TRUE);
// Debugging
/**
* When enabled, share the debug logs with care.

View File

@ -120,7 +120,10 @@ class SwipeControlsConfigurationProvider(
/**
* variable that stores the auto-brightness state, which used in restore brightness function
* it needed for that the brightness is not restored if auto-brightness is enabled
* if used as "non-setting" var brightness don`t restored after closing app
*/
var isEnabledAutoBrightness: Boolean = false
var isEnabledAutoBrightness: Boolean
get() = Settings.SWIPE_AUTO_BRIGHTNESS_STATE.get()
set(value) = Settings.SWIPE_AUTO_BRIGHTNESS_STATE.save(value)
//endregion
}