Browse Source

Merge pull request #108 from ionite34/fix-notifications-issue

pull/5/head
Ionite 1 year ago committed by GitHub
parent
commit
178a36438a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      StabilityMatrix/ViewModels/LaunchViewModel.cs

10
StabilityMatrix/ViewModels/LaunchViewModel.cs

@ -226,11 +226,21 @@ public partial class LaunchViewModel : ObservableObject
{ {
webUiUrl = url; webUiUrl = url;
ShowWebUiButton = true; ShowWebUiButton = true;
// Uwp toasts has upstream issues on some machines
// https://github.com/CommunityToolkit/WindowsCommunityToolkit/issues/4858
try
{
new ToastContentBuilder() new ToastContentBuilder()
.AddText("Stable Diffusion Web UI ready to go!") .AddText("Stable Diffusion Web UI ready to go!")
.AddButton("Open Web UI", ToastActivationType.Foreground, url) .AddButton("Open Web UI", ToastActivationType.Foreground, url)
.Show(); .Show();
} }
catch (Exception e)
{
logger.LogWarning("Failed to show Windows notification: {Message}", e.Message);
}
}
public void OnLoaded() public void OnLoaded()
{ {

Loading…
Cancel
Save