fix: add set_quiet_hours method and persist quiet hours config#19
Closed
fix: add set_quiet_hours method and persist quiet hours config#19
Conversation
- Add set_quiet_hours() method and quiet_hours_enabled attribute to ClockService, fixing AttributeError when saving quiet hours settings - Add quiet hours persistence to app.py _load_config/save_config - Sync quiet hours in _sync_service_settings on startup - Update tests to use set_quiet_hours() and add new tests Fixes #18
Owner
Author
|
Closing in favor of #20 which has better error handling and a cleaner property-based design. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #18 — Quiet hours settings crash on save and aren't restored on startup.
Changes
set_quiet_hours(start, end)method andquiet_hours_enabledattribute that the settings dialog was already calling (causing AttributeError)quiet_hours_enabled,quiet_start,quiet_end) to_load_config(),save_config(), and_sync_service_settings()set_quiet_hours(), added 2 new tests for the method and the enabled/disabled toggleTesting
All 21 clock service tests pass.