summaryrefslogtreecommitdiff
path: root/internal/client/ui/core/state
diff options
context:
space:
mode:
Diffstat (limited to 'internal/client/ui/core/state')
-rw-r--r--internal/client/ui/core/state/state.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/client/ui/core/state/state.go b/internal/client/ui/core/state/state.go
index 03b7b9d..044de2b 100644
--- a/internal/client/ui/core/state/state.go
+++ b/internal/client/ui/core/state/state.go
@@ -94,6 +94,12 @@ func UpdateNetworks(info *packet.NetworksInfo) {
}
}
+ // Remove any unrecognized networks
+ Data.Networks = slices.DeleteFunc(Data.Networks, func(id snowflake.ID) bool {
+ _, ok := State.Networks[id]
+ return !ok
+ })
+
data := JsonUserData()
gateway.SendAsync(&packet.SetUserData{
Data: &data,