Skip to content

Commit

Permalink
fix: make cleared dialog behave the same as it did before the history…
Browse files Browse the repository at this point in the history
… update
  • Loading branch information
liana-p committed Sep 1, 2024
1 parent 5eabc3b commit d0ce1fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/features/input-prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The input legend is an always-on list of input prompts at the bottom of the scre

Individual input prompts appear in various relevant bits of the UI:

![Input prompts](./input-prompts/input-prompts.webp)
![Input prompt](./input-prompts/input-prompt.webp)

## Configuration

Expand Down
6 changes: 5 additions & 1 deletion packages/narrat/src/components/game-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ const dialogContainerStyle = computed((): any => {
const lastDialog = computed((): DialogKey | undefined => {
if (dialog.value.length > 0) {
return dialog.value[dialog.value.length - 1];
const result = dialog.value[dialog.value.length - 1];
if (dialogStore.isDialogCleared(dialog.value.length - 1)) {
return undefined;
}
return result;
}
return undefined;
});
Expand Down

0 comments on commit d0ce1fc

Please sign in to comment.