Skip to content

Feat/pause tracking#77

Merged
Jozys merged 2 commits intomainfrom
feat/pause-tracking
Apr 5, 2025
Merged

Feat/pause tracking#77
Jozys merged 2 commits intomainfrom
feat/pause-tracking

Conversation

@Jozys
Copy link
Copy Markdown
Collaborator

@Jozys Jozys commented Apr 5, 2025

This pull request introduces several changes to enhance the activity tracking functionality, including the addition of pause/resume capabilities, updates to the tracking state, and improvements to the user interface.

Enhancements to Activity Tracking Functionality:

  • Added a new ActivityBroadcastReceiver in AndroidManifest.xml to handle pause and stop actions for activity tracking.
  • Updated the tracking state to include isPaused and durationMillis fields in TrackingState and modified the copyWith method accordingly. [1] [2]
  • Introduced a togglePauseTracking method in TrackingViewModel to handle pausing and resuming of activities, replacing the previous pauseTracking method.
  • Modified the startTimer and updateDuration methods in TrackingViewModel to work with durationMillis instead of a string duration.

User Interface Improvements:

  • Updated ActiveTracking widget to display durationMillis and handle paused state, including changes to the pause button icon. [1] [2]
  • Enhanced TrackingRecording widget to show the elapsed time and current speed, considering the paused state. [1] [2] [3] [4]
  • Adjusted TrackingFinished widget to display the total duration in milliseconds. [1] [2] [3]

Code Refactoring:

  • Updated various files to replace string duration with durationMillis and to include isPaused state where necessary. [1] [2] [3] [4]
  • Simplified event handling in TrackingViewModel by using constants from the Event class.

@Jozys Jozys requested a review from ScreepCode April 5, 2025 19:13
@Jozys Jozys self-assigned this Apr 5, 2025
@Jozys Jozys merged commit 79ed03f into main Apr 5, 2025
1 check passed
@Jozys Jozys deleted the feat/pause-tracking branch April 5, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants