Skip to content

Commit 88aa368

Browse files
committed
Code review comments
1 parent 1b17225 commit 88aa368

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Trimble.Modus.Components/Controls/Toast/TMToastContents.xaml.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,18 @@ private void SetTheme(String toastTheme)
155155
UpdateIconColor();
156156

157157
}
158-
159-
bool isPopupClosed = false;
158+
160159
private void CloseButtonClicked(object sender, EventArgs e)
161-
{
162-
PopupService.Instance.RemovePageAsync(this, true);
163-
isPopupClosed = true;
160+
{
161+
if (PopupService.Instance.PopupStack.Contains(this))
162+
PopupService.Instance.RemovePageAsync(this, true);
164163
}
165164
public void CloseAfterDelay()
166165
{
167166
Task.Run(async () =>
168167
{
169168
await Task.Delay(DELAYTIME);
170-
if (!isPopupClosed)
169+
if (PopupService.Instance.PopupStack.Contains(this))
171170
await PopupService.Instance.RemovePageAsync(this, true);
172171
});
173172
}

0 commit comments

Comments
 (0)