public static RecentPostListingViewModel LoadViewModel(PostStore postStore, MessageStore messageStore)
        {
            RecentPostListingViewModel viewModel = new RecentPostListingViewModel(postStore, messageStore);

            viewModel.LoadPostsCommand.Execute(null);

            return(viewModel);
        }
Exemple #2
0
        public static RecentPostListingViewModel LoadViewModel(PostStore postStore, Action <Task> onLoaded = null)
        {
            RecentPostListingViewModel viewModel = new RecentPostListingViewModel(postStore);

            viewModel.LoadPosts().ContinueWith(t => onLoaded?.Invoke(t));

            return(viewModel);
        }
Exemple #3
0
 public PostHomeViewModel(CreatePostViewModel createPostViewModel, RecentPostListingViewModel recentPostListingViewModel)
 {
     CreatePostViewModel        = createPostViewModel;
     RecentPostListingViewModel = recentPostListingViewModel;
 }