8000 Change "save pour only" to "save post-heating only" by tpict · Pull Request #161 · obiwan007/despresso · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change "save pour only" to "save post-heating only" #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/model/services/ble/machine_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,8 @@ class EspressoMachineService extends ChangeNotifier {
var cs = Shot();
cs.coffee.targetId = coffeeService.selectedCoffeeId;
cs.recipe.targetId = coffeeService.selectedRecipeId;
var save = settingsService.savePrePouring;
cs.shotstates.addAll(
shotList.entries.where((element) => (element.isPouring == true || save) && element.isInterpolated == false));
shotList.entries.where((element) => element.isInterpolated == false));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No additional filtering is required here, since the heating phase gets wiped out in the main loop if the user hasn't opted in to saving it.


cs.pourTime = lastPourTime;
cs.profileId = profileService.currentProfile?.id ?? "";
Expand Down
4 changes: 2 additions & 2 deletions lib/model/services/state/settings_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ class SettingsService extends ChangeNotifier {
bool get recordPrePouring => Settings.getValue<bool>(SettingKeys.recordPrePouring.name) ?? true;
set recordPrePouring(bool value) => Settings.setValue<bool>(SettingKeys.recordPrePouring.name, value);

/// save the shot including pre pouring states.
bool get savePrePouring => Settings.getValue<bool>(SettingKeys.savePrePouring.name) ?? true;
/// save heating phase of shots
bool get savePrePouring => Settings.getValue<bool>(SettingKeys.savePrePouring.name) ?? false;
set savePrePouring(bool value) => Settings.setValue<bool>(SettingKeys.savePrePouring.name, value);

bool get scaleStartTimer => Settings.getValue<bool>(SettingKeys.scaleStartTimer.name) ?? true;
Expand Down
0