properly destroy channel preview (#1910)

This commit is contained in:
Jason Dove
2024-10-04 12:29:40 -05:00
committed by GitHub
parent 7bba422880
commit 7d6faee27b
3 changed files with 15 additions and 8 deletions
+8 -3
View File
@@ -1,4 +1,5 @@
@inject IJSRuntime JsRuntime
@implements IDisposable
<div>
<MudDialog>
@@ -43,6 +44,11 @@
}
private void Close()
{
MudDialog.Close(DialogResult.Ok(true));
}
public void Dispose()
{
try
{
@@ -50,10 +56,9 @@
}
catch (Exception)
{
// ignored
// ignore
}
MudDialog.Close(DialogResult.Ok(true));
MudDialog?.Dispose();
}
}