1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-01 00:39:11 +08:00

Simplify show/hide logic

This commit is contained in:
Bartłomiej Dach 2020-02-02 17:41:42 +01:00
parent 72107c27c9
commit c479d0efa4

View File

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