Beispiel #1
0
        public async Task LoadAsync()
        {
            var contents = await _monkeyHubApiService.GetContentsByTagIdAsync(_tag.Id);

            Contents.Clear();
            foreach (var content in contents)
            {
                Contents.Add(content);
            }
        }
Beispiel #2
0
        public async void LoadContent()
        {
            var contents = await monkeyHubApiService.GetContentsByTagIdAsync(Tag.Id);

            DataSource.Clear();
            if (contents.Any())
            {
                foreach (Content content in contents)
                {
                    DataSource.Add(content);
                }
            }
            else
            {
                await App.Current.MainPage.DisplayAlert("Nada encontrado",
                                                        $"Não encontramos nenhum conteúdo para '{Tag}'!", "Ok");
            }
        }