Skip to content

Commit

Permalink
Allow mod search always - hack version (does not remove loader)
Browse files Browse the repository at this point in the history
  • Loading branch information
yairm210 committed Oct 14, 2024
1 parent f9d21d2 commit d26d942
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,13 @@ class ModManagementScreen private constructor(
}

loading.show() // Now that it's on stage, start animation
replaceLoadingWithOptions()

// Allow clicking the loading icon to stop the query
loading.onClick {
if (runningSearchJob?.isActive != true) return@onClick
runningSearchJob?.cancel()
markOnlineQueryIncomplete()
replaceLoadingWithOptions()
}
}

Expand Down Expand Up @@ -291,7 +292,6 @@ class ModManagementScreen private constructor(
Log.error("Could not download mod list", ex)
launchOnGLThread {
ToastPopup("Could not download mod list", this@ModManagementScreen)
replaceLoadingWithOptions()
}
Gdx.app.clipboard.contents = ex.stackTraceToString()
runningSearchJob = null
Expand Down Expand Up @@ -370,8 +370,6 @@ class ModManagementScreen private constructor(
// continue search unless last page was reached
if (repoSearch.items.size >= amountPerPage && !stopBackgroundTasks)
tryDownloadPage(pageNum + 1)
else
replaceLoadingWithOptions()
}

private fun markOnlineQueryIncomplete() {
Expand Down

0 comments on commit d26d942

Please sign in to comment.