~ruther/NosTale-PacketLogger

c6c25ecfa9fb706b8c729ddf402bfac15613edda — Rutherther 2 years ago d5280ea
feat: react to handshake response initialization result
1 files changed, 9 insertions(+), 0 deletions(-)

M src/PacketLogger/ViewModels/DocumentViewModel.cs
M src/PacketLogger/ViewModels/DocumentViewModel.cs => src/PacketLogger/ViewModels/DocumentViewModel.cs +9 -0
@@ 27,6 27,7 @@ using NosSmooth.Core.Stateful;
using PacketLogger.Models;
using PacketLogger.Models.Packets;
using ReactiveUI;
using Remora.Results;

namespace PacketLogger.ViewModels;



@@ 145,6 146,14 @@ public class DocumentViewModel : Document, INotifyPropertyChanged, IDisposable
                    return;
                }

                var handshakeInitResponse = handshakeResponse.InitializationErrorfulResult ?? Result.FromSuccess();
                if (!handshakeInitResponse.IsSuccess)
                {
                    repository.Remove(connection.Client);
                    Console.WriteLine(handshakeInitResponse.ToFullString());
                    return;
                }

                _cleanUp = process.WhenPropertyChanged(x => x.CharacterString)
                    .ObserveOn(RxApp.MainThreadScheduler)
                    .Do

Do not follow this link