Skip to content

Commit a089281

Browse files
committed
Fix initial flip animation when unexpected
1 parent 45dfa0d commit a089281

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Card/RankedPlayCard.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public RankedPlayCard(RankedPlayCardWithPlaylistItem item)
101101
cardContent = new Container
102102
{
103103
RelativeSizeAxes = Axes.Both,
104-
Child = new RankedPlayCardBackSide()
104+
Child = Empty(),
105105
},
106106
selectionOutline = new SelectionOutline
107107
{
@@ -172,8 +172,14 @@ private void loadCardContentAsync(MultiplayerPlaylistItem playlistItem) => Task.
172172
});
173173
});
174174

175+
private bool hasContent;
176+
175177
public void SetContent(Drawable? newContent)
176178
{
179+
if (newContent == null && !hasContent)
180+
return;
181+
182+
hasContent = newContent != null;
177183
content.ScaleTo(new Vector2(0, 1), 100, Easing.In)
178184
.Then()
179185
.Schedule(() => cardContent.Child = newContent ?? Empty())

0 commit comments

Comments
 (0)