Allow mod search always - hack version (does not remove loader)

This commit is contained in:
yairm210
2024-10-14 17:11:39 +03:00
parent f9d21d2767
commit d26d942f58

View File

@ -243,12 +243,13 @@ class ModManagementScreen private constructor(
} }
loading.show() // Now that it's on stage, start animation loading.show() // Now that it's on stage, start animation
replaceLoadingWithOptions()
// Allow clicking the loading icon to stop the query // Allow clicking the loading icon to stop the query
loading.onClick { loading.onClick {
if (runningSearchJob?.isActive != true) return@onClick if (runningSearchJob?.isActive != true) return@onClick
runningSearchJob?.cancel() runningSearchJob?.cancel()
markOnlineQueryIncomplete() markOnlineQueryIncomplete()
replaceLoadingWithOptions()
} }
} }
@ -291,7 +292,6 @@ class ModManagementScreen private constructor(
Log.error("Could not download mod list", ex) Log.error("Could not download mod list", ex)
launchOnGLThread { launchOnGLThread {
ToastPopup("Could not download mod list", this@ModManagementScreen) ToastPopup("Could not download mod list", this@ModManagementScreen)
replaceLoadingWithOptions()
} }
Gdx.app.clipboard.contents = ex.stackTraceToString() Gdx.app.clipboard.contents = ex.stackTraceToString()
runningSearchJob = null runningSearchJob = null
@ -370,8 +370,6 @@ class ModManagementScreen private constructor(
// continue search unless last page was reached // continue search unless last page was reached
if (repoSearch.items.size >= amountPerPage && !stopBackgroundTasks) if (repoSearch.items.size >= amountPerPage && !stopBackgroundTasks)
tryDownloadPage(pageNum + 1) tryDownloadPage(pageNum + 1)
else
replaceLoadingWithOptions()
} }
private fun markOnlineQueryIncomplete() { private fun markOnlineQueryIncomplete() {