1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Refactor cancellation of expand to be more explicit

This commit is contained in:
Dean Herbert 2021-12-15 16:38:19 +09:00
parent 94d1a2aaca
commit 6a1f535257
2 changed files with 4 additions and 4 deletions

View File

@ -289,10 +289,10 @@ namespace osu.Game.Beatmaps.Drawables.Cards
},
Unhovered = _ =>
{
// This hide should only trigger if the expanded content has not shown yet.
// ie. if the user has not shown intent to want to see it (quickly moved over the info row area).
// Handles the case where a user has not shown explicit intent to view expanded info.
// ie. quickly moved over the info row area but didn't remain within it.
if (!Expanded.Value)
content.CollapseAfterDelay();
content.CancelExpand();
}
}
}

View File

@ -123,7 +123,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
public void ExpandAfterDelay() => queueExpandedStateChange(true, 100);
public void CollapseAfterDelay() => queueExpandedStateChange(false, 500);
public void CancelExpand() => scheduledExpandedChange?.Cancel();
private void collapseIfNotHovered()
{