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.compose.runtime.collectAsState
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import io.github.chinosk.gakumas.localify.hookUtils.FileHotUpdater
|
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.hookUtils.MainKeyEventDispatcher
|
||||||
import io.github.chinosk.gakumas.localify.mainUtils.json
|
import io.github.chinosk.gakumas.localify.mainUtils.json
|
||||||
import io.github.chinosk.gakumas.localify.models.GakumasConfig
|
import io.github.chinosk.gakumas.localify.models.GakumasConfig
|
||||||
@ -72,7 +73,8 @@ class MainActivity : ComponentActivity(), ConfigUpdateListener, IConfigurableAct
|
|||||||
var resVersionText = "unknown"
|
var resVersionText = "unknown"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
resVersionText = programConfigViewModel.localResourceVersion.value
|
val stream = assets.open("${FilesChecker.localizationFilesDir}/version.txt")
|
||||||
|
resVersionText = FilesChecker.convertToString(stream)
|
||||||
|
|
||||||
val packInfo = packageManager.getPackageInfo(packageName, 0)
|
val packInfo = packageManager.getPackageInfo(packageName, 0)
|
||||||
val version = packInfo.versionName
|
val version = packInfo.versionName
|
||||||
|
Loading…
x
Reference in New Issue
Block a user