Skip to content

Commit

Permalink
if no current screen show the interstitial screen if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
caleeli committed Oct 2, 2023
1 parent 0109614 commit e7e1f9c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ export default {
task: {
handler() {
if (!this.screen) {
// if no current screen show the interstitial screen if exists
this.screen = this.task && this.task.interstitial_screen;
}
this.taskId = this.task.id;
this.nodeId = this.task.element_id;
this.listenForParentChanges();
Expand Down Expand Up @@ -528,6 +532,16 @@ export default {
this.nodeId = this.initialNodeId;
this.requestData = this.value;
this.loopContext = this.initialLoopContext;
if (
this.$parent.task &&
!this.$parent.task.screen &&
this.$parent.task.allow_interstitial &&
this.$parent.task.interstitial_screen
) {
// if interstitial screen exists, show it
console.log(this.$parent.task.interstitial_screen);
this.screen = this.$parent.task.interstitial_screen;
}
},
destroyed() {
this.unsubscribeSocketListeners();
Expand Down

0 comments on commit e7e1f9c

Please sign in to comment.