diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-09-24 17:32:45 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-09-24 17:32:45 -0500 |
| commit | a4fcf65d451e9c2629f9f113ca06485b7e564f8e (patch) | |
| tree | 2fcd069a7c98e0a941d240053415b22dd141547a /src | |
| parent | 9b8d59a93b4661f7e3650e025b725498b9a5567b (diff) | |
| download | slskd-a4fcf65d451e9c2629f9f113ca06485b7e564f8e.tar.gz | |
fix state bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 4990186e..86d74d4d 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -986,6 +986,8 @@ namespace slskd { var (previous, current) = state; + Console.WriteLine(current); + if (!previous.Scanning && current.Scanning) { // the scan is starting @@ -1025,7 +1027,7 @@ namespace slskd else if (!previous.Ready && current.Ready) { // the share transitioned into ready without completing a scan; it was loaded from disk - State.SetValue(state => state with { Shares = state.Shares with { ScanPending = false } }); + State.SetValue(state => state with { Shares = current with { ScanPending = false } }); Log.Information("Share cache loaded from disk successfully. Sharing {Directories} directories and {Files} files", current.Directories, current.Files); _ = CacheBrowseResponse(); } |
