diff --git a/Trimble.Modus.Components/Controls/Toast/TMToastContents.xaml.cs b/Trimble.Modus.Components/Controls/Toast/TMToastContents.xaml.cs index 67666597..ce6efeb2 100644 --- a/Trimble.Modus.Components/Controls/Toast/TMToastContents.xaml.cs +++ b/Trimble.Modus.Components/Controls/Toast/TMToastContents.xaml.cs @@ -154,19 +154,20 @@ private void SetTheme(String toastTheme) } UpdateIconColor(); - } - private void CloseButtonClicked(object sender, EventArgs e) - - { - PopupService.Instance.RemovePageAsync(this, true); + } + private void CloseButtonClicked(object sender, EventArgs e) + { + if (PopupService.Instance.PopupStack.Contains(this)) + PopupService.Instance.RemovePageAsync(this, true); } public void CloseAfterDelay() { Task.Run(async () => { - await Task.Delay(DELAYTIME); - await PopupService.Instance.RemovePageAsync(this, true); + await Task.Delay(DELAYTIME); + if (PopupService.Instance.PopupStack.Contains(this)) + await PopupService.Instance.RemovePageAsync(this, true); }); } diff --git a/Trimble.Modus.Components/Trimble.Modus.Components.csproj b/Trimble.Modus.Components/Trimble.Modus.Components.csproj index aa698959..a83f10bf 100644 --- a/Trimble.Modus.Components/Trimble.Modus.Components.csproj +++ b/Trimble.Modus.Components/Trimble.Modus.Components.csproj @@ -27,7 +27,7 @@ True Trimble.Modus.Components Trimble Modus - 1.3.0.2 + 1.3.0.3 Trimble Inc Trimble Inc Trimble.Modus.Components