Skip to content

Commit

Permalink
i hate it here
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjustin000 committed Aug 31, 2024
1 parent e7101c7 commit 1b42c35
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(IntegratedDemonlist VERSION 1.5.9)
project(IntegratedDemonlist VERSION 1.5.10)

add_library(${PROJECT_NAME} SHARED
src/IDListLayer.cpp
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Integrated Demonlist Changelog
## v1.5.10 (2024-08-31)
- Fixed a bug where the game would crash if the Pemonlist or AREDL button was clicked when the search results were empty

## v1.5.9 (2024-08-30)
- Moved the "Failed to load" notifications to log messages
- Added the status code to the "Load Failed" popup
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"win": "2.206",
"mac": "2.206"
},
"version": "v1.5.9",
"version": "v1.5.10",
"id": "hiimjustin000.integrated_demonlist",
"name": "Integrated Demonlist",
"developer": "hiimjustin000",
Expand Down
4 changes: 3 additions & 1 deletion src/IDListLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ bool IDListLayer::init() {
}
m_infoButton->m_title = "All Rated Extreme Demons List";
m_infoButton->m_description = AREDL_INFO;
m_fullSearchResults.clear();
IntegratedDemonlist::loadAREDL(std::move(m_aredlListener), std::move(m_aredlOkListener), m_loadingCircle, [this] { page(0); });
});
m_starToggle->setPosition(30.0f, 60.0f);
Expand All @@ -121,6 +122,7 @@ bool IDListLayer::init() {
}
m_infoButton->m_title = "Pemonlist";
m_infoButton->m_description = PEMONLIST_INFO;
m_fullSearchResults.clear();
IntegratedDemonlist::loadPemonlist(std::move(m_pemonlistListener), std::move(m_pemonlistOkListener), m_loadingCircle, [this] { page(0); });
});
m_moonToggle->setPosition(60.0f, 60.0f);
Expand Down Expand Up @@ -323,7 +325,7 @@ void IDListLayer::search() {

void IDListLayer::page(int page) {
auto maxPage = (m_fullSearchResults.size() + 9) / 10;
m_page = (maxPage + (page % maxPage)) % maxPage;
m_page = maxPage > 0 ? (maxPage + (page % maxPage)) % maxPage : 0;
showLoading();
populateList(m_query);
}
Expand Down

0 comments on commit 1b42c35

Please sign in to comment.