mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2025-02-24 02:02:51 +08:00
#35 Close toast when app is suspended or closed: lastly, added WP8 (fix)
This commit is contained in:
parent
d175358f36
commit
39dd68c7c0
@ -90,7 +90,10 @@ namespace WPCordovaClassLib.Cordova.Commands
|
||||
pgrid.Width = Application.Current.Host.Content.ActualWidth - 80;
|
||||
|
||||
b.Child = pgrid;
|
||||
this.hide(null);
|
||||
if (popup != null && popup.IsOpen)
|
||||
{
|
||||
popup.IsOpen = false;
|
||||
}
|
||||
popup = new Popup();
|
||||
popup.Child = b;
|
||||
|
||||
@ -144,10 +147,13 @@ namespace WPCordovaClassLib.Cordova.Commands
|
||||
|
||||
public void hide(string options)
|
||||
{
|
||||
if (popup != null && popup.IsOpen)
|
||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
popup.IsOpen = false;
|
||||
}
|
||||
if (popup != null && popup.IsOpen)
|
||||
{
|
||||
popup.IsOpen = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async void hidePopup(int delay)
|
||||
|
Loading…
Reference in New Issue
Block a user