From 46222abb7acf95a22ec92feb3929f94a644cf838 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Sat, 28 Dec 2024 00:54:21 +0100 Subject: [PATCH] fix filter cache causing issues with level folders --- src/hooks/GameLevelManager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hooks/GameLevelManager.cpp b/src/hooks/GameLevelManager.cpp index b9725e8..140a0aa 100644 --- a/src/hooks/GameLevelManager.cpp +++ b/src/hooks/GameLevelManager.cpp @@ -112,7 +112,7 @@ class BI_DLL $modify(GameLevelManager) { m_fields->filteredLevels = nullptr; } - if(m_fields->filteredLevels != nullptr) return m_fields->filteredLevels; + if(m_fields->filteredLevels != nullptr && folderID == 0) return m_fields->filteredLevels; CCArray* pRet = CCArray::create(); @@ -209,9 +209,11 @@ class BI_DLL $modify(GameLevelManager) { pRet->addObject(level); } - Mod::get()->setSavedValue("user_search_dirty", false); + if(folderID == 0) { + Mod::get()->setSavedValue("user_search_dirty", false); + m_fields->filteredLevels = pRet; + } - m_fields->filteredLevels = pRet; return pRet; }