Skip to content

Commit

Permalink
Always use UI Thread to spawn background activity notification
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-nyan committed Feb 21, 2025
1 parent 2654e1b commit 17392b8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using CollapseLauncher.Dialogs;
using CollapseLauncher.Extension;
using CollapseLauncher.Helper;
using CollapseLauncher.Helper.Metadata;
using CollapseLauncher.Interfaces;
using CollapseLauncher.Statics;
Expand Down Expand Up @@ -29,7 +30,8 @@ public static void Attach(int hashID, IBackgroundActivity activity, string activ
return;
}

AttachEventToNotification(hashID, activity, activityTitle, activitySubtitle);
WindowUtility.CurrentDispatcherQueue?
.TryEnqueue(() => AttachEventToNotification(hashID, activity, activityTitle, activitySubtitle));
BackgroundActivities.Add(hashID, activity);
#if DEBUG
Logger.LogWriteLine($"Background activity with ID: {hashID} has been attached", LogType.Debug, true);
Expand Down

0 comments on commit 17392b8

Please sign in to comment.