예제 #1
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();
            var rankings = await http.GetTop10Ranking();

            if (rankings.Count == 0)
            {
                await DisplayAlert("Ranking", "Não há usúarios cadastrados", "Ok");
            }
            else
            {
                RankingUsers.Clear();
                foreach (var rank in rankings)
                {
                    RankingUsers.Add(rank);
                }

                RankingList.ItemsSource = RankingUsers;
            }
            RankingList.IsVisible = true;
            Loading.IsVisible     = false;
            Loading.IsRunning     = false;
        }