From edf6889af9e7f68caead9b8139178a36b4b5b2d6 Mon Sep 17 00:00:00 2001 From: VioletSnowLeopard Date: Thu, 1 May 2025 20:57:39 -0400 Subject: [PATCH] fix switching filters to do its intended behavior --- source/funkin/ui/freeplay/FreeplayState.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 1da2e6b0a..3529d1559 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -510,10 +510,10 @@ class FreeplayState extends MusicBeatSubState generateSongList({filterType: REGEXP, filterData: str}, true); } - // If the current song is still in the list (aka not null?), we'll land on it + // If the current song is still in the list, or if it was random, we'll land on it // Otherwise we want to land on the first song of the group, rather than random song when changing letter sorts // that is, only if there's more than one song in the group! - if (curSong != null && currentFilteredSongs.length > 1) + if (curSong == null || currentFilteredSongs.contains(curSong)) { changeSelection(); }