ReactiveUI 26 (#10249)

* ReactiveUI 25

* Fix

* Up

* ReactiveUI 26
This commit is contained in:
DHR60
2026-11-01 12:00:02 +00:00
committed by GitHub
parent 57f17d5939
commit e2f4292321
14 changed files with 52 additions and 60 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ public static class Extension
[CallerFilePath] string filePath = "",
[CallerLineNumber] int lineNumber = 0)
{
return Signal.Defer(() => interaction.Handle(input))
return Signal.Defer(() => interaction.WhenHandled(input))
.Catch<TOutput, UnhandledInteractionException<TInput, TOutput>>(ex =>
{
Logging.SaveLog($"Unhandled interaction exception in {memberName} at {filePath}:{lineNumber}", ex);
-4
View File
@@ -10,10 +10,6 @@
<PackageReference Include="ReactiveUI">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
<PackageReference Include="ReactiveUI.SourceGenerators">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="sqlite-net-e" />
<PackageReference Include="Repobot.SQLite.Unofficial" />
<PackageReference Include="NLog" />
@@ -103,6 +103,9 @@ public partial class AddServerViewModel : MyReactiveObject, ICloseable
[Reactive]
public partial string MasqueHeaders { get; set; }
[Reactive]
public partial string Network { get; set; }
[Reactive]
public partial string RawHeaderType { get; set; }
@@ -274,7 +277,7 @@ public partial class AddServerViewModel : MyReactiveObject, ICloseable
this.WhenAnyValue(x => x.CertSha)
.Subscribe(_ => UpdateCertTip());
this.WhenAnyValue(x => x.SelectedSource.Network)
this.WhenAnyValue(x => x.Network)
.Subscribe(_ =>
{
this.RaisePropertyChanged(nameof(TransportHeaderType));
@@ -299,6 +302,7 @@ public partial class AddServerViewModel : MyReactiveObject, ICloseable
CoreType = SelectedSource?.CoreType?.ToString();
AllowInsecure = SelectedSource?.GetAllowInsecure() == true;
MuxEnabled = SelectedSource?.MuxEnabled == true;
Network = SelectedSource?.Network ?? Global.DefaultNetwork;
Cert = SelectedSource?.Cert ?? string.Empty;
CertSha = SelectedSource?.CertSha ?? string.Empty;
@@ -405,10 +409,11 @@ public partial class AddServerViewModel : MyReactiveObject, ICloseable
SelectedSource.MuxEnabled = MuxEnabled;
SelectedSource.Cert = Cert.IsNullOrEmpty() ? string.Empty : Cert;
SelectedSource.CertSha = CertSha.IsNullOrEmpty() ? string.Empty : CertSha;
if (!Global.Networks.Contains(SelectedSource.Network))
if (!Global.Networks.Contains(Network))
{
SelectedSource.Network = Global.DefaultNetwork;
Network = Global.DefaultNetwork;
}
SelectedSource.Network = Network;
var transport = new TransportExtraItem
{
@@ -35,7 +35,7 @@ public partial class DNSSettingViewModel : MyReactiveObject, ICloseable
[Reactive] public partial bool RayCustomDNSEnableCompatible { get; set; }
[Reactive] public partial bool SBCustomDNSEnableCompatible { get; set; }
public bool IsSimpleDNSEnabled => !(RayCustomDNSEnableCompatible && SBCustomDNSEnableCompatible);
[ObservableAsProperty] public partial bool IsSimpleDNSEnabled { get; }
public ReactiveCommand<RxVoid, RxVoid> SaveCmd { get; }
public ReactiveCommand<RxVoid, RxVoid> ImportDefConfig4V2rayCompatibleCmd { get; }
@@ -60,8 +60,11 @@ public partial class DNSSettingViewModel : MyReactiveObject, ICloseable
await Task.CompletedTask;
});
this.WhenAnyValue(x => x.RayCustomDNSEnableCompatible, x => x.SBCustomDNSEnableCompatible)
.Subscribe(_ => this.RaisePropertyChanged(nameof(IsSimpleDNSEnabled)));
_isSimpleDNSEnabledHelper = this.WhenAnyValue(
x => x.RayCustomDNSEnableCompatible,
x => x.SBCustomDNSEnableCompatible,
(a, b) => !(a && b))
.ToProperty(this, nameof(IsSimpleDNSEnabled));
_ = Init();
}