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
This commit is contained in:
parent
9c269fc9ba
commit
d175358f36
@ -2,7 +2,7 @@
|
||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="nl.x-services.plugins.toast"
|
||||
version="2.0.6-dev">
|
||||
version="2.0.6">
|
||||
|
||||
<name>Toast</name>
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user