fix(MainActivity.kt): update resVersionText
Some checks failed
Android CI / build (push) Has been cancelled
Some checks failed
Android CI / build (push) Has been cancelled
This commit is contained in:
parent
265d8dc9ca
commit
95b78be2eb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user