Skip to content

Commit

Permalink
fix level duplication in lsvl
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Jul 7, 2024
1 parent 6eef0cd commit 5e4f5ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/layers/LevelFiltering/LevelSearchViewLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void LevelSearchViewLayer::reload() {

resetUnloadedLevels();

m_data = CCArray::create();
setData(CCArray::create());
scheduleUpdate();

loadPage(true);
Expand Down Expand Up @@ -149,8 +149,12 @@ void LevelSearchViewLayer::startLoading(){
if(!searchObj) return;

while(auto key = ServerUtils::getStoredOnlineLevels(searchObj->getKey())) {
searchObj->m_page += 1;
loadLevelsFinished(key, "");

//recursive loop for played type
if(!m_gjSearchObj) return startLoading();

searchObj->m_page += 1;
}

m_gjSearchObjLoaded = searchObj;
Expand Down

0 comments on commit 5e4f5ca

Please sign in to comment.