Skip to content

Portable Tool for an Ideal Windows Setup

-rollback due to crash under certain conditions

Greedeksa61ee6bc9984
diff --git a/.Source/GTweak/Utilities/ViewNotification.cs b/.Source/GTweak/Utilities/ViewNotification.cs
index db972f14..a97a6817 100644
--- a/.Source/GTweak/Utilities/ViewNotification.cs
+++ b/.Source/GTweak/Utilities/ViewNotification.cs
@@ -1,6 +1,7 @@
using GTweak.Windows;
using System.Threading;
using System.Threading.Tasks;
+using System.Windows;
namespace GTweak.Utilities
{
@@ -17,24 +18,27 @@ namespace GTweak.Utilities
await Task.Delay(300);
- Parallel.Invoke(async delegate
+ Application.Current.Dispatcher.Invoke(delegate
{
- NotificationWindow notificationWindow = new NotificationWindow();
+ Parallel.Invoke(async delegate
+ {
+ NotificationWindow notificationWindow = new NotificationWindow();
- if (notificationWindow.IsLoaded || isAlreadyLaunch)
- return;
+ if (notificationWindow.IsLoaded || isAlreadyLaunch)
+ return;
- isAlreadyLaunch = true;
+ isAlreadyLaunch = true;
- notificationWindow = new NotificationWindow
- {
- TitleNotice = tittle,
- TextNotice = content,
- ActionChoice = action,
- };
- await Task.Delay(100);
- notificationWindow.Show();
- notificationWindow.Closed += delegate { isAlreadyLaunch = false; };
+ notificationWindow = new NotificationWindow
+ {
+ TitleNotice = tittle,
+ TextNotice = content,
+ ActionChoice = action,
+ };
+ await Task.Delay(100);
+ notificationWindow.Show();
+ notificationWindow.Closed += delegate { isAlreadyLaunch = false; };
+ });
});
}
}