mirror of
https://github.com/CherretGit/zaprett-app.git
synced 2025-12-10 21:49:38 +05:00
update version, change repository urls
This commit is contained in:
@@ -15,8 +15,8 @@ android {
|
||||
applicationId = "com.cherret.zaprett"
|
||||
minSdk = 29
|
||||
targetSdk = 35
|
||||
versionCode = 18
|
||||
versionName = "2.6"
|
||||
versionCode = 19
|
||||
versionName = "2.7"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
ndk {
|
||||
|
||||
@@ -124,14 +124,14 @@ fun SettingsScreen(viewModel : SettingsViewModel = viewModel()) {
|
||||
Setting.Action(
|
||||
title = stringResource(R.string.btn_repository_url_lists),
|
||||
onClick = {
|
||||
textDialogValue.value = sharedPreferences.getString("hosts_repo_url", "https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/hosts.json") ?: "https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/hosts.json"
|
||||
textDialogValue.value = sharedPreferences.getString("hosts_repo_url", "https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/hosts.json") ?: "https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/hosts.json"
|
||||
showHostsRepoUrlDialog.value = true
|
||||
}
|
||||
),
|
||||
Setting.Action(
|
||||
title = stringResource(R.string.btn_repository_url_strategies),
|
||||
onClick = {
|
||||
textDialogValue.value = sharedPreferences.getString("strategy_repo_url", "https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/strategies.json") ?: "https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/strategies.json"
|
||||
textDialogValue.value = sharedPreferences.getString("strategy_repo_url", "https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/strategies.json") ?: "https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/strategies.json"
|
||||
showStrategyRepoUrlDialog.value = true
|
||||
}
|
||||
),
|
||||
|
||||
@@ -27,7 +27,7 @@ private val client = OkHttpClient()
|
||||
private val json = Json { ignoreUnknownKeys = true }
|
||||
|
||||
fun getHostList(sharedPreferences: SharedPreferences, callback: (List<RepoItemInfo>?) -> Unit) {
|
||||
val request = Request.Builder().url(sharedPreferences.getString("hosts_repo_url","https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/hosts.json")?: "https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/hosts.json").build()
|
||||
val request = Request.Builder().url(sharedPreferences.getString("hosts_repo_url","https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/hosts.json")?: "https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/hosts.json").build()
|
||||
client.newCall(request).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {
|
||||
e.printStackTrace()
|
||||
@@ -47,7 +47,7 @@ fun getHostList(sharedPreferences: SharedPreferences, callback: (List<RepoItemIn
|
||||
}
|
||||
|
||||
fun getStrategiesList(sharedPreferences: SharedPreferences, callback: (List<RepoItemInfo>?) -> Unit) {
|
||||
val request = Request.Builder().url(sharedPreferences.getString("strategies_repo_url", "https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/strategies.json")?: "https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/strategies.json").build()
|
||||
val request = Request.Builder().url(sharedPreferences.getString("strategies_repo_url", "https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/strategies.json")?: "https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/strategies.json").build()
|
||||
client.newCall(request).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {
|
||||
e.printStackTrace()
|
||||
|
||||
Reference in New Issue
Block a user