mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-17 16:55:10 +00:00
more crowdin tests
This commit is contained in:
parent
9670a50d1f
commit
dc4b0144e0
2 changed files with 4 additions and 7 deletions
|
@ -2,6 +2,7 @@ package com.vanced.manager.core
|
|||
|
||||
import android.app.Application
|
||||
import android.util.Log
|
||||
import android.os.Build
|
||||
import com.crowdin.platform.Crowdin
|
||||
import com.crowdin.platform.CrowdinConfig
|
||||
import com.crowdin.platform.data.remote.NetworkType
|
||||
|
@ -14,16 +15,15 @@ class App: Application() {
|
|||
super.onCreate()
|
||||
PRDownloader.initialize(this)
|
||||
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
|
||||
Crowdin.init(this,
|
||||
CrowdinConfig.Builder()
|
||||
.withDistributionHash("36c51aed3180a4f43073d28j4s6")
|
||||
.withNetworkType(NetworkType.WIFI)
|
||||
.build()
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
Log.d("VMLocalisation", "Failed to initialize Crowdin")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -65,11 +65,8 @@ open class HomeViewModel(application: Application): AndroidViewModel(application
|
|||
fun fetchData() {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
fetching.set(true)
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R)
|
||||
Crowdin.forceUpdate(getApplication())
|
||||
} catch (e: Exception) {
|
||||
Log.d("VMLocalisation", "Error: ", e)
|
||||
}
|
||||
vancedVersion.set(getJsonString("vanced.json", "version", getApplication()))
|
||||
microgVersion.set(getJsonString("microg.json", "version", getApplication()))
|
||||
microgInstalled.set(isPackageInstalled("com.mgoogle.android.gms", pm))
|
||||
|
|
Loading…
Reference in a new issue