mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-02-18 21:00:38 +01:00
Fix stroboscope stored progress
This commit is contained in:
parent
87e92df993
commit
3414295887
@ -336,7 +336,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
camera.enableFlashlight()
|
camera.enableFlashlight()
|
||||||
}
|
}
|
||||||
|
|
||||||
_stroboscopeBarValue.value = preferences.stroboscopeProgress.toFloat() / 100
|
_stroboscopeBarValue.value = preferences.stroboscopeProgress.toFloat() / MAX_STROBO_DELAY
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
@ -373,7 +373,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
val newLevel = MathUtils.lerp(min.toFloat(), max.toFloat(), 1 - newValue)
|
val newLevel = MathUtils.lerp(min.toFloat(), max.toFloat(), 1 - newValue)
|
||||||
camera.stroboFrequency = newLevel.toLong()
|
camera.stroboFrequency = newLevel.toLong()
|
||||||
preferences.stroboscopeFrequency = newLevel.toLong()
|
preferences.stroboscopeFrequency = newLevel.toLong()
|
||||||
preferences.stroboscopeProgress = ((1 - newLevel) * 100).toInt()
|
preferences.stroboscopeProgress = ((1 - newLevel) * MAX_STROBO_DELAY).toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onResume() {
|
fun onResume() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user