Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 29 additions & 32 deletions StabilityMatrix.Avalonia/Services/NotificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ public void Initialize(
notificationManager = new WindowNotificationManager(TopLevel.GetTopLevel(visual))
{
Position = position,
MaxItems = maxItems
MaxItems = maxItems,
};
}

public void Show(INotification notification)
{
notificationManager?.Show(notification);
// Must marshal to UI thread - WindowNotificationManager requires it
Dispatcher.UIThread.Invoke(() => notificationManager?.Show(notification));
}

/// <inheritdoc />
Expand Down Expand Up @@ -94,25 +95,23 @@ bool isPersistent
// Show app toast
if (isPersistent)
{
Dispatcher.UIThread.Invoke(
() =>
ShowPersistent(
notification.Title ?? "",
notification.Body ?? "",
key.Level.ToNotificationType()
)
Dispatcher.UIThread.Invoke(() =>
ShowPersistent(
notification.Title ?? "",
notification.Body ?? "",
key.Level.ToNotificationType()
)
);
}
else
{
Dispatcher.UIThread.Invoke(
() =>
Show(
notification.Title ?? "",
notification.Body ?? "",
key.Level.ToNotificationType(),
expiration
)
Dispatcher.UIThread.Invoke(() =>
Show(
notification.Title ?? "",
notification.Body ?? "",
key.Level.ToNotificationType(),
expiration
)
);
}
return;
Expand All @@ -130,25 +129,23 @@ await nativeManager.ShowNotification(
// Show app toast
if (isPersistent)
{
Dispatcher.UIThread.Invoke(
() =>
ShowPersistent(
notification.Title ?? "",
notification.Body ?? "",
key.Level.ToNotificationType()
)
Dispatcher.UIThread.Invoke(() =>
ShowPersistent(
notification.Title ?? "",
notification.Body ?? "",
key.Level.ToNotificationType()
)
);
}
else
{
Dispatcher.UIThread.Invoke(
() =>
Show(
notification.Title ?? "",
notification.Body ?? "",
key.Level.ToNotificationType(),
expiration
)
Dispatcher.UIThread.Invoke(() =>
Show(
notification.Title ?? "",
notification.Body ?? "",
key.Level.ToNotificationType(),
expiration
)
);
}

Expand Down
4 changes: 3 additions & 1 deletion StabilityMatrix.Core/Models/Packages/InvokeAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ IPipWheelService pipWheelService
public override PackageDifficulty InstallerSortOrder => PackageDifficulty.Advanced;

public override Uri PreviewImageUri =>
new("https://raw.githubusercontent.com/invoke-ai/InvokeAI/main/docs/assets/canvas_preview.png");
new(
"https://raw.githubusercontent.com/invoke-ai/InvokeAI/refs/heads/main/docs-old/assets/canvas_preview.png"
);

public override IEnumerable<SharedFolderMethod> AvailableSharedFolderMethods =>
[SharedFolderMethod.None, SharedFolderMethod.Configuration];
Expand Down
Loading