ShowMore button update

This commit is contained in:
EVAST9919
2019-05-28 17:04:05 +03:00
parent 2d4ef1bec9
commit 6ca3bd086f
5 changed files with 146 additions and 37 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.API.Requests;
using osu.Game.Users;
@ -9,6 +8,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
namespace osu.Game.Overlays.Profile.Sections.Ranks
{
@ -41,8 +41,8 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
if (!scores.Any() && VisiblePages == 1)
{
ShowMoreButton.Hide();
ShowMoreLoading.Hide();
MoreButton.Hide();
MoreButton.IsLoading = false;
MissingText.Show();
return;
}
@ -63,8 +63,8 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
LoadComponentsAsync(drawableScores, s =>
{
MissingText.Hide();
ShowMoreButton.FadeTo(scores.Count == ItemsPerPage ? 1 : 0);
ShowMoreLoading.Hide();
MoreButton.FadeTo(scores.Count == ItemsPerPage ? 1 : 0);
MoreButton.IsLoading = false;
ItemsContainer.AddRange(s);
});