|
|
|
@ -26,8 +26,16 @@ public class DialogManager : IDisposable
|
|
|
|
|
void OnDialogOpened(object? openSender, DialogOpenedEventArgs openArgs)
|
|
|
|
|
{
|
|
|
|
|
void OnScreenClosed(object? closeSender, EventArgs args)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
openArgs.Session.Close();
|
|
|
|
|
}
|
|
|
|
|
catch (InvalidOperationException)
|
|
|
|
|
{
|
|
|
|
|
// Race condition: dialog is already being closed
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dialogScreen.Closed -= OnScreenClosed;
|
|
|
|
|
}
|
|
|
|
|
dialogScreen.Closed += OnScreenClosed;
|
|
|
|
|