mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2026-04-28 00:00:04 +08:00
#35 Close toast when app is suspended or closed: lastly, added WP8
This commit is contained in:
+9
-4
@@ -90,10 +90,7 @@ namespace WPCordovaClassLib.Cordova.Commands
|
||||
pgrid.Width = Application.Current.Host.Content.ActualWidth - 80;
|
||||
|
||||
b.Child = pgrid;
|
||||
if (popup != null && popup.IsOpen)
|
||||
{
|
||||
popup.IsOpen = false;
|
||||
}
|
||||
this.hide(null);
|
||||
popup = new Popup();
|
||||
popup.Child = b;
|
||||
|
||||
@@ -145,6 +142,14 @@ namespace WPCordovaClassLib.Cordova.Commands
|
||||
});
|
||||
}
|
||||
|
||||
public void hide(string options)
|
||||
{
|
||||
if (popup != null && popup.IsOpen)
|
||||
{
|
||||
popup.IsOpen = false;
|
||||
}
|
||||
}
|
||||
|
||||
private async void hidePopup(int delay)
|
||||
{
|
||||
await Task.Delay(delay);
|
||||
|
||||
Reference in New Issue
Block a user