aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2025-09-19 21:14:31 +0200
committertpart <tpart120@proton.me>2025-09-19 21:14:31 +0200
commit374adcd03cec6ebca1c0c59a8e066654c19e7273 (patch)
tree09fc626e6489c6a08b599c9f1f16d6a11f3c666c
parent0ea59d68f2095929ac6f8cc53f5f3c28f854db05 (diff)
downloadhurrycurry-374adcd03cec6ebca1c0c59a8e066654c19e7273.tar
hurrycurry-374adcd03cec6ebca1c0c59a8e066654c19e7273.tar.bz2
hurrycurry-374adcd03cec6ebca1c0c59a8e066654c19e7273.tar.zst
Only show fetching server list text if online feature enabled
-rw-r--r--client/system/server_list.gd7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/system/server_list.gd b/client/system/server_list.gd
index 77b5ee0c..a7e83729 100644
--- a/client/system/server_list.gd
+++ b/client/system/server_list.gd
@@ -66,18 +66,19 @@ func fetch_server_list(registry: Registry) -> void:
match registry:
Registry.MDNS:
if Settings.read("online.use_discover"):
+ loading = true
+ update_loading.emit(true)
match Discover.state:
Service.State.STOPPED: Discover.start()
Service.State.RUNNING: mdns.request(MDNS_URL, HEADERS)
Registry.GLOBAL:
if Settings.read("online.use_registry"):
+ loading = true
+ update_loading.emit(true)
var url: String = Settings.read("online.registry_url")
url = url.replace("https:", "http:") if using_http_fallback else url
reg.request(url + "/v1/list", HEADERS)
- loading = true
- update_loading.emit(true)
-
func _on_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray, registry: Registry):
loading = false
update_loading.emit(false)