Skip to content

Commit

Permalink
https://git.snapgenshin.com/DGP-Studio/Feedback/issues/152
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Jan 20, 2025
1 parent 5306799 commit 592442d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ internal sealed unsafe partial class LoopbackSupport : ObservableObject
{
private readonly string hutaoContainerStringSid;

public LoopbackSupport()
public LoopbackSupport(IServiceProvider serviceProvider)
{
Initialize(out hutaoContainerStringSid);
serviceProvider.GetRequiredService<ILogger<LoopbackSupport>>().LogInformation("Container SID: {SID}", hutaoContainerStringSid);
}

[ObservableProperty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using JetBrains.Annotations;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Markup;
using Snap.Hutao.Core.Abstraction;

namespace Snap.Hutao.Service.Notification;
Expand Down Expand Up @@ -30,10 +31,10 @@ public static IInfoBarOptionsBuilder SetMessage<TBuilder>(this TBuilder builder,
return builder;
}

public static IInfoBarOptionsBuilder SetContent<TBuilder>(this TBuilder builder, object? content)
public static IInfoBarOptionsBuilder SetContent<TBuilder>(this TBuilder builder, string xaml)
where TBuilder : IInfoBarOptionsBuilder
{
builder.Configure(builder => builder.Options.Content = content);
builder.Configure(builder => builder.Options.Content = XamlReader.Load(xaml));
return builder;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,9 @@ public IAdvancedCollectionView<SpiralAbyssView>? SpiralAbyssEntries
get;
set
{
if (SpiralAbyssEntries is not null)
{
SpiralAbyssEntries.CurrentChanged -= OnCurrentSpiralAbyssEntryChanged;
}

AdvancedCollectionViewCurrentChanged.Detach(field, OnCurrentSpiralAbyssEntryChanged);
SetProperty(ref field, value);

if (value is not null)
{
value.CurrentChanged += OnCurrentSpiralAbyssEntryChanged;
}
AdvancedCollectionViewCurrentChanged.Attach(field, OnCurrentSpiralAbyssEntryChanged);
}
}

Expand Down

0 comments on commit 592442d

Please sign in to comment.