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);
		}
Beispiel #2
0
        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);
        }