public ConversationViewModel (long recipientId) { messages = new ObservableCollection<MessageViewModel>(); dataManager = App.DataManager; messageRepository = App.MessageRepository; App.MessagesManager.MessageArrived += OnMessageArrived; App.MessagesManager.MessageStatusChanged += OnMessageStatusChanged; this.recipientId = recipientId; IsTyping = isTyping; uiThreadDispacher = ServiceContainer.Resolve<IUIThreadDispacher>(); var typingManager = ServiceContainer.Resolve<TypingService>(); opponentTypingController = new OpponentTypingController(uiThreadDispacher, typingManager); currentUserTypingController = new CurrentUserTypingController(recipientId, typingManager, App.FriendsViewModel); opponentTypingController.Subscribe(recipientId, i => IsTyping = i); }
public ConversationViewModel(long recipientId) { messages = new ObservableCollection <MessageViewModel>(); dataManager = App.DataManager; messageRepository = App.MessageRepository; App.MessagesManager.MessageArrived += OnMessageArrived; App.MessagesManager.MessageStatusChanged += OnMessageStatusChanged; this.recipientId = recipientId; IsTyping = isTyping; uiThreadDispacher = ServiceContainer.Resolve <IUIThreadDispacher>(); var typingManager = ServiceContainer.Resolve <TypingService>(); opponentTypingController = new OpponentTypingController(uiThreadDispacher, typingManager); currentUserTypingController = new CurrentUserTypingController(recipientId, typingManager, App.FriendsViewModel); opponentTypingController.Subscribe(recipientId, i => IsTyping = i); }
public OpponentTypingController(IUIThreadDispacher threadDispacher, TypingService typingService) { this.threadDispacher = threadDispacher; this.typingService = typingService; }