public YapperChatViewModel(bool startup) { Messenger.Default.Register<RefreshGroupsEvent>(this, this.ReadGroupsRefreshContactsPage); this.conversationsViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<AllConversationsViewModel>(); this.newTaskCountViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<NewTaskCountViewModel>(); this.newMessageCountViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<NewMessageCountViewModel>(); if (!startup) { this.registeredUsersViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<RegisteredUsersViewModel>(); this.groupsViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<AllGroupsViewModel>(); this.tasksViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<AllTasksViewModel>(); } }
public YapperChatViewModel(bool startup) { Messenger.Default.Register <RefreshGroupsEvent>(this, this.ReadGroupsRefreshContactsPage); this.conversationsViewModel = ViewModelLocator.Instance.CreateOrGetViewModel <AllConversationsViewModel>(); this.newTaskCountViewModel = ViewModelLocator.Instance.CreateOrGetViewModel <NewTaskCountViewModel>(); this.newMessageCountViewModel = ViewModelLocator.Instance.CreateOrGetViewModel <NewMessageCountViewModel>(); if (!startup) { this.registeredUsersViewModel = ViewModelLocator.Instance.CreateOrGetViewModel <RegisteredUsersViewModel>(); this.groupsViewModel = ViewModelLocator.Instance.CreateOrGetViewModel <AllGroupsViewModel>(); this.tasksViewModel = ViewModelLocator.Instance.CreateOrGetViewModel <AllTasksViewModel>(); } }