Skip to content

Commit

Permalink
Made InterActiveController.Run obsolete. You can now always use the S…
Browse files Browse the repository at this point in the history
…howDialog method and don't need to check whether the controller is running in your code.
  • Loading branch information
ThomasRemmery committed Jul 15, 2024
1 parent 430b961 commit ce58072
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion InteractiveAutomationToolkit/InteractiveController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public void RequestManualMode(Action action)
/// Use <see cref="RequestManualMode" /> if you want to manually control when the dialog is updated.
/// </summary>
/// <param name="startDialog">Dialog to be shown first.</param>
[Obsolete("No need to use this specific run method anymore to show the initial dialog. You can now always use the ShowDialog method.")]
public void Run(Dialog startDialog)
{
if (startDialog == null)
Expand Down Expand Up @@ -129,7 +130,14 @@ public void ShowDialog(Dialog dialog)
throw new ArgumentNullException("dialog");
}

nextDialog = dialog;
if (IsRunning)
{
nextDialog = dialog;
}
else
{
Run(dialog);
}
}

/// <summary>
Expand Down

0 comments on commit ce58072

Please # to comment.