Skip to content

Commit

Permalink
Force all folders opened when in app tutorial is running
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreSi committed Jan 16, 2025
1 parent f2b308f commit 427a2e3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import {
LeafTreeViewItem as InstructionLeafTreeViewItem,
getInstructionGroupId,
} from './InstructionOrExpressionTreeViewItems';
import InAppTutorialContext from '../../InAppTutorial/InAppTutorialContext';

const gd: libGDevelop = global.gd;

Expand Down Expand Up @@ -289,6 +290,9 @@ const InstructionOrObjectSelector = React.forwardRef<
],
})
);
const { currentlyRunningInAppTutorial } = React.useContext(
InAppTutorialContext
);

const [searchText, setSearchText] = React.useState<string>('');
const [searchResults, setSearchResults] = React.useState<{
Expand Down Expand Up @@ -766,6 +770,7 @@ const InstructionOrObjectSelector = React.forwardRef<
getItemName={getTreeViewItemName}
shouldApplySearchToItem={shouldApplySearchToItem}
getItemDescription={getTreeViewItemDescription}
forceAllOpened={!!currentlyRunningInAppTutorial}
getItemId={getTreeViewItemId}
getItemHtmlId={getTreeViewItemHtmlId}
getItemChildren={getTreeViewItemChildren}
Expand Down

0 comments on commit 427a2e3

Please sign in to comment.