Skip to content

Conversation

@Jozys
Copy link
Collaborator

@Jozys Jozys commented Apr 29, 2025

MoveTopia Update Changelog

Bug fixes

  • Fixed wrong grouped workouts by date
  • Fixed health data history availablity check
  • Minor UX changes

Fehlerbehebungen

  • Fehlerhafte Gruppierung von Aktivitäten nach Daten behoben
  • Fehlende Überprüfung, ob HealthData Historie verfügbar ist hinzugefügt
  • Kleine UX Verbesserungen

Jozys added 8 commits April 27, 2025 17:27
- In case of Health Connect historical health functionality is not available, hide the corresponding PermissionCard
- Add localization for missing read permission
# 🚀 Pull Request

## Brief Description
This pull requests resolves missing center alignment for the tabs inside
the Badge Screen

## Linked Issues
<!-- Link related issues with the format: Fixes #123, Resolves #456,
Closes #1337 -->
- Fixes #137 

## Screenshots
<!-- Add screenshots if UI changes were made. Either new screens only or
before/after -->
| Old | New  |
|----------|----------|

|![image](https://github.com/user-attachments/assets/230bcd2e-3694-4425-baa4-34c03b97863e)|
![image](https://github.com/user-attachments/assets/56bceab3-1e22-41c2-b140-2e68116d4d48)
|

## GitHub Copilot Text
This pull request introduces a small change to the `BadgeTabsView` class
in the `badge_lists_screen.dart` file. The change adds a new property,
`tabAlignment`, to the `TabBar` widget, setting it to
`TabAlignment.center` to ensure the tabs are centrally aligned.
# 🚀 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
<!-- GitHub Copilot can suggest a PR description here -->
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]](diffhunk://#diff-88f7691689bff6b9ae5559a39398280e2b845d3fe6c13d6a14e5387fb374e83cL144-R156)
[[2]](diffhunk://#diff-88f7691689bff6b9ae5559a39398280e2b845d3fe6c13d6a14e5387fb374e83cR204-R207)

### 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.
# 🚀 Pull Request

## Brief Description
This pull request hide the corresponding PermissionCard in case of
Health Connect historical health functionality is not available. Apart
from that it also localizes missing read permission.

## Linked Issues
<!-- Link related issues with the format: Fixes #123, Resolves #456,
Closes #1337 -->
- Partly solves #139 

## GitHub Copilot Text
This pull request introduces support for checking the availability of
historical health data permissions, refactors error messages to use
localized strings, and updates the UI logic to conditionally display
historical health data options based on availability. Below are the key
changes grouped by theme:

### Localization Updates:
* Added a new localized string `permission_health_read_missing` to both
`lib/l10n/app_de.arb` and `lib/l10n/app_en.arb` for displaying a message
when health data read permissions are missing.
[[1]](diffhunk://#diff-36252c65ab82cbff4774b4983cb9027a2bef4cb738d5ea656c0b903939b3871aR341)
[[2]](diffhunk://#diff-9796fde3771f42a3a759ccc941731d83f96037a661e47dde27ce81d3447a69c2R360)

### Permissions State Enhancements:
* Introduced a new property `isHealthHistoricalAvailable` in the
`PermissionsState` class to track the availability of historical health
data functionality. Updated the constructor, `copyWith` method, and
`PermissionsNotifier` logic to handle this property.
[[1]](diffhunk://#diff-8a4214800464620d2099bc7cfa9c805f54af891b727a07e2d6b5ff7f71f66bacR22-R27)
[[2]](diffhunk://#diff-8a4214800464620d2099bc7cfa9c805f54af891b727a07e2d6b5ff7f71f66bacR37)
[[3]](diffhunk://#diff-8a4214800464620d2099bc7cfa9c805f54af891b727a07e2d6b5ff7f71f66bacR47)
[[4]](diffhunk://#diff-8a4214800464620d2099bc7cfa9c805f54af891b727a07e2d6b5ff7f71f66bacR62-R63)
[[5]](diffhunk://#diff-8a4214800464620d2099bc7cfa9c805f54af891b727a07e2d6b5ff7f71f66bacL287-R310)

### UI Logic Adjustments:
* Updated the `PermissionsPage` and `PermissionsSettingsScreen` widgets
to use the new `isHealthHistoricalAvailable` property instead of relying
solely on the platform check. This ensures the historical health data
option is displayed only when available.
[[1]](diffhunk://#diff-ed114b585bef8ee4333df6f2e72f1c9dfa98c882124fb226aad2ea091e172338L203-R203)
[[2]](diffhunk://#diff-ed114b585bef8ee4333df6f2e72f1c9dfa98c882124fb226aad2ea091e172338L219-R218)
[[3]](diffhunk://#diff-90b689fa9760b9b500d20dba87b979e37ee2b6d7f8034db402842ca07274eeffL196-R196)
[[4]](diffhunk://#diff-90b689fa9760b9b500d20dba87b979e37ee2b6d7f8034db402842ca07274eeffL210-R209)

### Error Message Refactoring:
* Replaced hardcoded error messages for missing health data read
permissions with the localized `permission_health_read_missing` string
across multiple widgets for consistency.
[[1]](diffhunk://#diff-ed114b585bef8ee4333df6f2e72f1c9dfa98c882124fb226aad2ea091e172338L147-R147)
[[2]](diffhunk://#diff-ed114b585bef8ee4333df6f2e72f1c9dfa98c882124fb226aad2ea091e172338L219-R218)
[[3]](diffhunk://#diff-90b689fa9760b9b500d20dba87b979e37ee2b6d7f8034db402842ca07274eeffL139-R139)
[[4]](diffhunk://#diff-90b689fa9760b9b500d20dba87b979e37ee2b6d7f8034db402842ca07274eeffL210-R209)
@Jozys Jozys self-assigned this Apr 29, 2025
@ScreepCode ScreepCode merged commit 5dcaade into main Apr 29, 2025
3 checks passed
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.

3 participants