Skip to content

Commit

Permalink
Merge pull request #111 from QuantumPhysique/issue107
Browse files Browse the repository at this point in the history
issue #107
  • Loading branch information
gwosd committed Jul 3, 2024
2 parents f3374aa + 6a87bb4 commit 151cb0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Bugfix 🐛:
- Fix broken color of linechart
- Allow adding measurements older than 2 years
- Fixed a bug where saving an unmodified measurement resulted in it being deleted


## [0.7.0] - 2024-05-29
Expand Down
13 changes: 5 additions & 8 deletions app/lib/widget/addWeightDialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ Future<bool> showAddWeightDialog({
date: currentDate,
),
);
if (!wasInserted) {
if (
!wasInserted && !(editMode && currentDate == initialDate &&
currentSliderValue == initialSliderValue)
) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
Expand All @@ -183,15 +186,9 @@ Future<bool> showAddWeightDialog({
)
);
}
Navigator.pop(context, true);
Navigator.pop(context, wasInserted);
},
enabled: true,
// enabled: editMode
// ? !(
// currentDate == initialDate &&
// initialSliderValue == currentSliderValue
// )
// : !editMode,
),
);
}
Expand Down

0 comments on commit 151cb0a

Please sign in to comment.