Trigger `On Delay` action with boolean logic

I’ve run into this issue multiple times, and have a workaround that seems to work in most cases, though sometimes it involves some extra steps. The workaround hinges on a “Navigate to” or “Open overlay” action. Either of these actions will jump-start any nested “After delay” interactions that aren’t firing.

In simple cases, such as the demo from @Alex_R above, you can do this:

  1. Create a small invisible frame with a single “After delay” interaction that closes the overlay after 1ms.
  2. Add an “Open overlay” action that opens your invisible frame to the click or other interaction that shows the problematic component.

In more complex cases, you may need to create a polling component that opens your invisible frame every 1000ms or so. This way, any nested “After delay” interactions that aren’t working will be jump-started on a regular basis. The caveat is that this will interrupt any “After delay” timers that are working, so you may need to increase the polling time so that everything has a chance to run before being jump-started.

Here’s how you would do that:

  1. Create a component (again, a small/invisible square is ideal).
  2. Add an “After delay” interaction that opens your invisible overlay after 1000ms.
  3. Add an instance of this component to any screen that you want to poll on.

This works despite the “After delay” action being nested because the action of opening the overlay will reset the timer.

Lastly, you can also do this trick with “Navigate to” and “Back”.

Here’s a file that shows both the simple and polling approaches, using an overlay: Jump-start prototype.fig (47.5 KB)

3 Likes