Fix difficulty selection behavior when going back from scoped beatmapset select#38023
Fix difficulty selection behavior when going back from scoped beatmapset select#38023n-saraseka wants to merge 2 commits into
Conversation
| if (beforeScopedSelection != null) | ||
| queueBeatmapSelection(beforeScopedSelection); | ||
| { | ||
| var beatmapToSwitchTo = carousel.CurrentGroupedBeatmap ?? beforeScopedSelection; |
There was a problem hiding this comment.
This won't work the way you're expecting it to. CurrentGroupedBeatmap will not get nulled if the current selection gets hidden by filters, so it will always revert to it, even if it should have reverted to a different selection. You can see it on the second video you've attached at 0:27 - once you unscope, the selection remains at the top diff, even though it is now hidden from view.
There was a problem hiding this comment.
It's the behavior I was expecting when doing this change, similar to how things work when a player selects a map and then filters it out. I'm not sure if there even is a case where it would get nulled in this branch of logic, but I left that as a fallback just in case because CurrentGroupedBeatmap is a nullable property and beforeScopedSelection is guaranteed to be not null here.
Is type casting to a GroupedBeatmap instead the way to go in such situation (even if it's a bit ugly) when it's known to not be null?
When a player switches to a
ScopedBeatmapSetDisplay, selects a different difficulty than they started at, and then goes back to showing all filtered beatmaps, the song select screen currently switches to the map they started at, which may feel unintuitive to the player, especially when selecting a difficulty that's way lower or way higher in the list. This change aims to fix this behavior and switch to the map they last selected instead.Before:
2026-06-08.18-58-26.1.mp4
After:
2026-06-08.19-32-38.1.mp4