From f03520a84f7ce90339f0339bb4bd7e7d0d34a856 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 5 Nov 2022 15:36:42 -0500 Subject: update counts when setting hosts --- src/slskd/Application.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 5e8da061..8edacac6 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -1063,7 +1063,16 @@ namespace slskd // have also happened above. a change in hosts will invalidate the cache, so do that too. if (previous.Hosts.ToJson() != current.Hosts.ToJson()) { - State.SetValue(state => state with { Shares = state.Shares with { Hosts = current.Hosts } }); + State.SetValue(state => state with + { + Shares = state.Shares with + { + Hosts = current.Hosts, + Directories = current.Directories, + Files = current.Files, + }, + }); + rebuildBrowseCache = true; } -- cgit v1.2.3