mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Refactor cancellation of expand to be more explicit
This commit is contained in:
parent
94d1a2aaca
commit
6a1f535257
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user