Skip to content

Commit

Permalink
#714 - Save again the brew when the while brewing is shown
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed May 22, 2024
1 parent 9279dbe commit 794edd5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
8 changes: 5 additions & 3 deletions src/app/brew/brew-add/brew-add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,11 @@ export class BrewAddComponent implements OnInit {
} catch (ex) {}
this.stopScaleTimer();
try {
Plotly.purge(
this.brewBrewing.brewBrewingGraphEl.profileDiv.nativeElement
);
if (this.brewBrewing.brewBrewingGraphEl) {
Plotly.purge(
this.brewBrewing.brewBrewingGraphEl.profileDiv.nativeElement
);
}
} catch (ex) {}
this.modalController.dismiss(
{
Expand Down
15 changes: 9 additions & 6 deletions src/app/brew/brew-edit/brew-edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ export class BrewEditComponent implements OnInit {
} catch (ex) {}
this.stopScaleTimer();
try {
Plotly.purge(
this.brewBrewing.brewBrewingGraphEl.profileDiv.nativeElement
);
if (this.brewBrewing.brewBrewingGraphEl) {
Plotly.purge(
this.brewBrewing.brewBrewingGraphEl.profileDiv.nativeElement
);
}
} catch (ex) {}
this.modalController.dismiss(
{
Expand Down Expand Up @@ -184,10 +186,11 @@ export class BrewEditComponent implements OnInit {
this.uiBrewHelper.cleanInvisibleBrewData(this.data);

if (
this.brewBrewing.brewBrewingGraphEl.flow_profile_raw.weight.length > 0 ||
this.brewBrewing.brewBrewingGraphEl.flow_profile_raw.pressureFlow.length >
this.brewBrewing?.brewBrewingGraphEl?.flow_profile_raw.weight.length >
0 ||
this.brewBrewing.brewBrewingGraphEl.flow_profile_raw.temperatureFlow
this.brewBrewing?.brewBrewingGraphEl?.flow_profile_raw.pressureFlow
.length > 0 ||
this.brewBrewing?.brewBrewingGraphEl?.flow_profile_raw.temperatureFlow
.length > 0
) {
const savedPath: string = await this.brewBrewing.saveFlowProfile(
Expand Down

0 comments on commit 794edd5

Please sign in to comment.