Fix missing text has been shown before api request has been completed

This commit is contained in:
EVAST9919 2017-11-08 20:42:24 +03:00
parent 2e67685762
commit edeeefea3b
3 changed files with 12 additions and 6 deletions

View File

@ -41,9 +41,11 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
ShowMoreButton.FadeTo(sets.Count == ItemsPerPage ? 1 : 0); ShowMoreButton.FadeTo(sets.Count == ItemsPerPage ? 1 : 0);
ShowMoreLoading.Hide(); ShowMoreLoading.Hide();
if (!sets.Any()) return; if (!sets.Any())
{
MissingText.Hide(); MissingText.Show();
return;
}
foreach (var s in sets) foreach (var s in sets)
{ {

View File

@ -74,7 +74,8 @@ namespace osu.Game.Overlays.Profile.Sections
MissingText = new OsuSpriteText MissingText = new OsuSpriteText
{ {
TextSize = 14, TextSize = 14,
Text = missing Text = missing,
Alpha = 0,
}, },
}; };
} }
@ -94,7 +95,6 @@ namespace osu.Game.Overlays.Profile.Sections
VisiblePages = 0; VisiblePages = 0;
ItemsContainer.Clear(); ItemsContainer.Clear();
ShowMoreButton.Hide(); ShowMoreButton.Hide();
MissingText.Show();
if (newUser != null) if (newUser != null)
ShowMore(); ShowMore();

View File

@ -41,7 +41,11 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
ShowMoreButton.FadeTo(scores.Count == ItemsPerPage ? 1 : 0); ShowMoreButton.FadeTo(scores.Count == ItemsPerPage ? 1 : 0);
ShowMoreLoading.Hide(); ShowMoreLoading.Hide();
if (!scores.Any()) return; if (!scores.Any())
{
MissingText.Show();
return;
}
MissingText.Hide(); MissingText.Hide();