From 1119f6c3cf421da2f2db92873efae8135c76b678 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 18:38:47 +0800 Subject: feat: enhance Java version management for Minecraft versions Added functionality to determine and validate the required Java version for Minecraft versions, including checks for compatibility with older versions. Implemented event emissions for version installation and deletion, and updated the UI to reflect Java version requirements and installation status. Improved version metadata handling and added support for deleting versions. --- ui/src/stores/game.svelte.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ui/src/stores') diff --git a/ui/src/stores/game.svelte.ts b/ui/src/stores/game.svelte.ts index 28b2db5..ca5dc2b 100644 --- a/ui/src/stores/game.svelte.ts +++ b/ui/src/stores/game.svelte.ts @@ -14,10 +14,8 @@ export class GameState { async loadVersions() { try { this.versions = await invoke("get_versions"); - if (this.versions.length > 0) { - const latest = this.versions.find((v) => v.type === "release"); - this.selectedVersion = latest ? latest.id : this.versions[0].id; - } + // Don't auto-select version here - let BottomBar handle version selection + // based on installed versions only } catch (e) { console.error("Failed to fetch versions:", e); uiState.setStatus("Error fetching versions: " + e); -- cgit v1.2.3-70-g09d2