@@ -228,7 +228,6 @@ internal static async Task InitializeStamp(string currentChannel, bool throwAfte
228228
229229 // Initialize and clear the stamp dictionary
230230 LauncherMetadataStampDictionary ??= new Dictionary < string , Stamp > ( ) ;
231-
232231 LauncherMetadataStampDictionary . Clear ( ) ;
233232
234233 FileStream ? stampLocalStream = null ;
@@ -351,6 +350,8 @@ internal static async Task InitializeConfig(string currentChannel,
351350 // Initialize the community tools properties
352351 PageStatics . CommunityToolsProperty ??= new CommunityToolsProperty ( ) ;
353352 PageStatics . CommunityToolsProperty . Clear ( ) ;
353+ PageStatics . CommunityToolsProperty . OfficialToolsDictionary ? . Clear ( ) ;
354+ PageStatics . CommunityToolsProperty . CommunityToolsDictionary ? . Clear ( ) ;
354355
355356 #region Master Key Loading
356357 // Load master key config
@@ -471,12 +472,12 @@ async ValueTask LoadRegionMetadataConfig((int, (Stamp?, ConcurrentDictionary<str
471472
472473 foreach ( KeyValuePair < GameNameType , List < CommunityToolsEntry > > entry in communityToolsProperty . OfficialToolsDictionary ?? [ ] )
473474 {
474- PageStatics . CommunityToolsProperty . OfficialToolsDictionary ? . Add ( entry . Key , entry . Value ) ;
475+ PageStatics . CommunityToolsProperty . OfficialToolsDictionary ? . TryAdd ( entry . Key , entry . Value ) ;
475476 }
476477
477478 foreach ( KeyValuePair < GameNameType , List < CommunityToolsEntry > > entry in communityToolsProperty . CommunityToolsDictionary ?? [ ] )
478479 {
479- PageStatics . CommunityToolsProperty . CommunityToolsDictionary ? . Add ( entry . Key , entry . Value ) ;
480+ PageStatics . CommunityToolsProperty . CommunityToolsDictionary ? . TryAdd ( entry . Key , entry . Value ) ;
480481 }
481482 }
482483 #endregion
0 commit comments