private void OnMessageStatusChanged(object sender, MessageStatusEventArgs e) { uiThreadDispacher.Dispatch(() => { var msg = Messages.FirstOrDefault(m => m.UnderlyingMessage.MessageToken == e.MessageToken); if (msg != null) { msg.ChangeStatus(e.Status); } }); }
public void Subscribe(long opponentId, Action <bool> isTypingChangedCallback) { this.isTypingChangedCallback = isTypingChangedCallback; typingService.SubscribeOnTyping(opponentId, i => threadDispacher.Dispatch(() => OnTyping(i))); }