fix applying end() on init
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 12s
Python / lint-format (pull_request) Successful in 23s
Python / test (pull_request) Successful in 49s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m3s

This commit is contained in:
2026-06-04 15:05:18 +02:00
parent 9168b6e893
commit 94f2cf076c
2 changed files with 9 additions and 4 deletions
@@ -104,10 +104,12 @@ void HyprsunsetManager::toggle() {
}
void HyprsunsetManager::start() {
if (m_enabled)
if (m_enabled && m_initialized)
return;
m_initialized = true;
m_enabled = true;
emit enabledChanged();
m_process.setProgram("hyprctl");
@@ -116,10 +118,12 @@ void HyprsunsetManager::start() {
}
void HyprsunsetManager::end() {
if (!m_enabled)
if (!m_enabled && m_initialized)
return;
m_initialized = true;
m_enabled = false;
emit enabledChanged();
m_process.setProgram("hyprctl");