public MainViewModel(IRestService restService, ILoginViewModel loginViewModel, IRegisterViewModel registerViewModel, IChatViewModel chatViewModel) { _restService = restService; LoginViewModel = loginViewModel; RegisterViewModel = registerViewModel; ChatViewModel = chatViewModel; Items.Add(loginViewModel); Items.Add(registerViewModel); Items.Add(chatViewModel); ScreenExtensions.TryActivate(this); ActivateItem(LoginViewModel); }
protected void FinishConversationExecuted(IChatViewModel interlocutorModel) { interlocutorModel.StopListen(); MessageFeed.Unsubscribe(interlocutorModel); ActiveChats.Remove(interlocutorModel); CurrentChat = ActiveChats.FirstOrDefault(); }