public void LoadData()
        {
            IsBusy = true;

            // Load data with services
            Items  = FeedService.GetAll();
            Videos = YoutubeService.GetAll();

            // Check if user enabled the Twitter feature.
            if (Preferences.Get(ENABLE_TWITTER_FEED_PREF_KEY, false))
            {
                // Update binded Tweets member with service-based tweets.
                Tweets = TwitterService.GetAll();
            }
            else
            {
                // Else return dummy tweet entry with helpful text that the
                // feature is disabled by the user.
                Tweets = new List <Tweet> {
                    CreateFeatureInfoTweet()
                };
            }

            IsBusy = false;
        }
Exemple #2
0
        public IActionResult Index()
        {
            var videos = _service.GetAll().Result;

            return(View(videos));
        }