From fe2eb86a080223695d78f5ade101db5cffd2a627 Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 8 Nov 2024 15:26:10 +0000 Subject: [PATCH] Removed messages from TTSPublisher --- Chat/Observers/TTSPublisher.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Chat/Observers/TTSPublisher.cs b/Chat/Observers/TTSPublisher.cs index fe81125..c2fd4ec 100644 --- a/Chat/Observers/TTSPublisher.cs +++ b/Chat/Observers/TTSPublisher.cs @@ -5,24 +5,17 @@ namespace TwitchChatTTS.Chat.Observers public class TTSPublisher : IObservable { private readonly HashSet> _observers; - private readonly HashSet _messages; public TTSPublisher() { _observers = new(); - _messages = new(); } public IDisposable Subscribe(IObserver observer) { - if (_observers.Add(observer)) - { - foreach (var item in _messages) - observer.OnNext(item); - } - + _observers.Add(observer); return new Unsubscriber(_observers, observer); } }