Skip to content

Commit

Permalink
fix filter cache causing issues with level folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Dec 27, 2024
1 parent 3342e3c commit 46222ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/hooks/GameLevelManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -209,9 +209,11 @@ class BI_DLL $modify(GameLevelManager) {
pRet->addObject(level);
}

Mod::get()->setSavedValue<bool>("user_search_dirty", false);
if(folderID == 0) {
Mod::get()->setSavedValue<bool>("user_search_dirty", false);
m_fields->filteredLevels = pRet;
}

m_fields->filteredLevels = pRet;
return pRet;
}

Expand Down

0 comments on commit 46222ab

Please sign in to comment.