Closed AmanPrasad43 closed 2 months ago
The changes introduce the DevTimeTrackerIdle
class to streamline development time tracking based on user activity. Utilizing a DispatcherTimer
, it pauses tracking after five minutes of inactivity, encapsulating the logic for resuming and pausing timers. The MainWindow
class is refactored to leverage this new functionality, enhancing maintainability and promoting better separation of concerns while preserving the original features.
File Path | Change Summary |
---|---|
Ginger/DevTimeTrackerIdle.cs |
Added the DevTimeTrackerIdle class with methods for managing user activity tracking: AttachActivityHandlers , PauseDevelopmentTimeTracker , and ResumeDevelopmentTimeTracker . |
Ginger/MainWindow.xaml.cs |
Refactored MainWindow to use DevTimeTrackerIdle , removing previous timer management methods and introducing DetachEventHandlers for better lifecycle management. |
sequenceDiagram
participant User
participant MainWindow
participant DevTimeTrackerIdle
User->>MainWindow: Interacts with UI
MainWindow->>DevTimeTrackerIdle: Attach activity handlers
User->>MainWindow: Stops interacting (5 min pass)
DevTimeTrackerIdle->>DevTimeTrackerIdle: PauseDevelopmentTimeTracker()
User->>MainWindow: Resumes interaction
DevTimeTrackerIdle->>DevTimeTrackerIdle: ResumeDevelopmentTimeTracker()
🐰 In a world of code, I hop and play,
Timers count the work in a clever way.
With a pause for rest, and a jump to start,
Development dances, a fine work of art.
Hooray for changes, so bright and new,
A happy rabbit says, "To code, woohoo!" 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thank you for your contribution. Before submitting this PR, please make sure:
Summary by CodeRabbit
New Features
Refactor