Skip to content

Conversation

@Jozys
Copy link
Collaborator

@Jozys Jozys commented Apr 27, 2025

🚀 Pull Request

Brief Description

This pull request resolves two bugs:

  1. A workout in utc time would be grouped to the wrong day if the MESZ time would be within 0.00 and 2.00 because the utc time is then on the previous day.
  2. The refresh indicator would not work if the list view in the activities screen does not cover the whole screen size.

GitHub Copilot Text

This pull request introduces several changes to improve the user interface and data handling in the activities screen and view model. The most significant updates include refactoring the layout of the grouped activities list for better scrolling behavior and ensuring workout start dates are converted to local time for accurate grouping.

UI Improvements:

  • Refactored _buildGroupedActivities in activities_screen.dart to wrap the ListView.builder in a LayoutBuilder, SingleChildScrollView, and ConstrainedBox for better handling of scrolling and layout constraints. This ensures the list always fills the available space and supports pull-to-refresh behavior. [1] [2]

Code Formatting:

  • Adjusted formatting in _buildGroupedActivities to improve code readability, particularly around Padding and Text widget properties.

Data Handling:

  • Updated ActivitiesViewModel in activities_view_model.dart to convert workout start dates to local time before grouping them by day. This ensures accurate grouping of activities based on the user's local timezone.

Minor Changes:

  • Added a blank line in the loop processing workouts in ActivitiesViewModel for better code organization.
  • Added a blank line after an import statement in activities_screen.dart for consistency.

@Jozys Jozys added the bug Something isn't working label Apr 27, 2025
@Jozys Jozys requested a review from ScreepCode April 27, 2025 15:41
@Jozys Jozys self-assigned this Apr 27, 2025
Copilot AI review requested due to automatic review settings April 27, 2025 15:41
Copy link
Contributor

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.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (2)
  • lib/presentation/activities/list/screen/activities_screen.dart: Language not supported
  • lib/presentation/activities/list/view_model/activities_view_model.dart: Language not supported

@Jozys Jozys merged commit 070313c into development Apr 29, 2025
2 checks passed
@Jozys Jozys deleted the fix/activities-screen branch April 29, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants