fix thread safety on plugin warning notification service
This commit is contained in:
		| @@ -416,6 +416,7 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase | ||||
|         else if (_charaHandler?.Address == nint.Zero && IsVisible) | ||||
|         { | ||||
|             IsVisible = false; | ||||
|             _charaHandler?.Invalidate(); | ||||
|             Logger.LogTrace("{this} visibility changed, now: {visi}", this, IsVisible); | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -4,12 +4,13 @@ using MareSynchronos.API.Data.Comparer; | ||||
| using MareSynchronos.Interop; | ||||
| using MareSynchronos.MareConfiguration; | ||||
| using MareSynchronos.Services.Mediator; | ||||
| using System.Collections.Concurrent; | ||||
|  | ||||
| namespace MareSynchronos.PlayerData.Pairs; | ||||
|  | ||||
| public class PluginWarningNotificationService | ||||
| { | ||||
|     private readonly Dictionary<UserData, OptionalPluginWarning> _cachedOptionalPluginWarnings = new(UserDataComparer.Instance); | ||||
|     private readonly ConcurrentDictionary<UserData, OptionalPluginWarning> _cachedOptionalPluginWarnings = new(UserDataComparer.Instance); | ||||
|     private readonly IpcManager _ipcManager; | ||||
|     private readonly MareConfigService _mareConfigService; | ||||
|     private readonly MareMediator _mediator; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 rootdarkarchon
					rootdarkarchon