Skip to content

Conversation

Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented Mar 18, 2025

Closes #359

@Tyrrrz Tyrrrz added the bug label Mar 18, 2025
@Tyrrrz Tyrrrz requested a review from Copilot March 18, 2025 18:30
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the LightBulb functionality to invalidate device contexts when the application (re-)enables the LightBulb, thereby ensuring that stale device contexts are refreshed.

  • In DashboardViewModel, a call to _gammaService.InvalidateDeviceContexts() is added when IsEnabled is true.
  • In GammaService, the InvalidateGamma() and InvalidateDeviceContexts() methods are changed from private to public and re-positioned.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
LightBulb/ViewModels/Components/DashboardViewModel.cs Added block to dispose timers and invalidate device contexts when enabled
LightBulb/Services/GammaService.cs Made InvalidateGamma() and InvalidateDeviceContexts() public to support external calls

Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.35%. Comparing base (2838552) to head (b159525).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #361   +/-   ##
=======================================
  Coverage   96.35%   96.35%           
=======================================
  Files           7        7           
  Lines         192      192           
  Branches       15       15           
=======================================
  Hits          185      185           
  Misses          6        6           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Tyrrrz Tyrrrz merged commit 05aabeb into master Mar 20, 2025
8 checks passed
@Tyrrrz Tyrrrz deleted the invalidate-dc-on-enable branch March 20, 2025 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When unplugging monitors LightBulb only works after restarting
1 participant