Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Feb 3, 2025
1 parent 9bf801a commit 38df4c2
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions packages/project-editor/lvgl/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1227,10 +1227,9 @@ export class LVGLBuild extends Build {
build.project.settings.build.screensLifetimeSupport &&
!page.isUsedAsUserWidget
) {
build.line(
build.blockStart(
`void ${this.getScreenDeleteFunctionName(page)}() {`
);
build.indent();

if (this.isV9) {
build.line(
Expand All @@ -1256,11 +1255,16 @@ export class LVGLBuild extends Build {
}
}

build.line(
`deletePageFlowState(${build.assets.getFlowIndex(page)});`
);
build.unindent();
build.line("}");
if (build.project.projectTypeTraits.hasFlowSupport) {
build.line(
`deletePageFlowState(${build.assets.getFlowIndex(
page
)});`
);
}

build.blockEnd("}");

build.line("");
}

Expand Down Expand Up @@ -1655,7 +1659,10 @@ export class LVGLBuild extends Build {
build.line("");
}

if (build.project.settings.build.screensLifetimeSupport) {
if (
this.assets.projectStore.projectTypeTraits.hasFlowSupport &&
build.project.settings.build.screensLifetimeSupport
) {
build.line("eez_flow_set_create_screen_func(create_screen);");
build.line("eez_flow_set_delete_screen_func(delete_screen);");
build.line(
Expand Down

0 comments on commit 38df4c2

Please sign in to comment.