mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 06:20:34 +00:00
Fix serializable files not always getting written on change
In some cases, STJ might decide to replace the object rather than populating it. This will work for majority of properties and use cases, however, we actually set up events on some properties to notify us back if they change during runtime. That event registration did not work properly, as the object was replaced with the new, that did not have appropriate listeners set up. Populate rather than replacing those selected properties, which fixes the problem.
This commit is contained in:
@@ -38,6 +38,7 @@ namespace ArchiSteamFarm.OfficialPlugins.ItemsMatcher;
|
||||
internal sealed class BotCache : SerializableFile {
|
||||
[JsonDisallowNull]
|
||||
[JsonInclude]
|
||||
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
|
||||
internal ConcurrentList<AssetForListing> LastAnnouncedAssetsForListing { get; private init; } = [];
|
||||
|
||||
internal string? LastAnnouncedTradeToken {
|
||||
|
||||
Reference in New Issue
Block a user