Simplify show/hide logic

This commit is contained in:
Bartłomiej Dach 2020-02-02 17:41:42 +01:00
parent 72107c27c9
commit c479d0efa4
1 changed files with 1 additions and 4 deletions

View File

@ -139,10 +139,7 @@ private void updateDisplay(User user)
anyInfoAdded |= tryAddInfo(FontAwesome.Solid.Link, websiteWithoutProtocol, user.Website);
// If no information was added to the bottomLinkContainer, hide it to avoid unwanted padding
if (anyInfoAdded)
bottomLinkContainer.Show();
else
bottomLinkContainer.Hide();
bottomLinkContainer.Alpha = anyInfoAdded ? 1 : 0;
}
private void addSpacer(OsuTextFlowContainer textFlow) => textFlow.AddArbitraryDrawable(new Container { Width = 15 });