From 95b78be2ebabf65dbe5255045cd89ce1f0432cf0 Mon Sep 17 00:00:00 2001 From: Natsu Date: Tue, 2 Jul 2024 16:48:52 +0700 Subject: [PATCH] fix(MainActivity.kt): update resVersionText --- .../java/io/github/chinosk/gakumas/localify/MainActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/github/chinosk/gakumas/localify/MainActivity.kt b/app/src/main/java/io/github/chinosk/gakumas/localify/MainActivity.kt index 1bc5d54..fc363c2 100644 --- a/app/src/main/java/io/github/chinosk/gakumas/localify/MainActivity.kt +++ b/app/src/main/java/io/github/chinosk/gakumas/localify/MainActivity.kt @@ -14,6 +14,7 @@ import androidx.compose.runtime.State import androidx.compose.runtime.collectAsState import androidx.lifecycle.ViewModelProvider import io.github.chinosk.gakumas.localify.hookUtils.FileHotUpdater +import io.github.chinosk.gakumas.localify.hookUtils.FilesChecker import io.github.chinosk.gakumas.localify.hookUtils.MainKeyEventDispatcher import io.github.chinosk.gakumas.localify.mainUtils.json import io.github.chinosk.gakumas.localify.models.GakumasConfig @@ -72,7 +73,8 @@ class MainActivity : ComponentActivity(), ConfigUpdateListener, IConfigurableAct var resVersionText = "unknown" try { - resVersionText = programConfigViewModel.localResourceVersion.value + val stream = assets.open("${FilesChecker.localizationFilesDir}/version.txt") + resVersionText = FilesChecker.convertToString(stream) val packInfo = packageManager.getPackageInfo(packageName, 0) val version = packInfo.versionName