Skip to content

Commit

Permalink
fix double list downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Aug 8, 2024
1 parent 7f05fc0 commit 3f0223a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changelog
## <cg>v4.2.7</c> (2024-08-04)
## <cg>v4.2.7</c> (2024-08-08)
* <cg>Fixed</c> <cr>a crash</c> when <cj>Last Page Search</c> reaches infinite pages
* <cg>Fixed</c> a rare <cr>startup crash</c> caused by <cj>Level Lists</c>
* <cg>Changed</c> <cj>Creator Point Breakdown</c> so it doesn't consider Legendary levels Epic
Expand Down
3 changes: 3 additions & 0 deletions src/managers/BetterInfoCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,14 @@ size_t BetterInfoCache::claimableListsCount() {
void BetterInfoCache::downloadClaimableLists() {
if(m_claimableLists.empty()) return;

static std::set<int> downloadingLists;
std::vector<int> toDownload;
for(auto [listID, _] : m_claimableLists) {
if(_ != nullptr) continue;
if(downloadingLists.contains(listID)) continue;

toDownload.push_back(listID);
downloadingLists.insert(listID);
}

std::thread([this, toDownload = std::move(toDownload)] {
Expand Down

0 comments on commit 3f0223a

Please sign in to comment.