mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 00:12:50 -05:00
gamma: fix night mode toggling
This commit is contained in:
@@ -1210,6 +1210,12 @@ func (m *Manager) SetEnabled(enabled bool) {
|
|||||||
m.configMutex.Unlock()
|
m.configMutex.Unlock()
|
||||||
|
|
||||||
if enabled {
|
if enabled {
|
||||||
|
targetTemp := m.calculateTemperature(time.Now())
|
||||||
|
m.transitionMutex.Lock()
|
||||||
|
m.currentTemp = targetTemp
|
||||||
|
m.targetTemp = targetTemp
|
||||||
|
m.transitionMutex.Unlock()
|
||||||
|
|
||||||
if !m.controlsInitialized {
|
if !m.controlsInitialized {
|
||||||
m.post(func() {
|
m.post(func() {
|
||||||
log.Info("Creating gamma controls")
|
log.Info("Creating gamma controls")
|
||||||
|
|||||||
Reference in New Issue
Block a user