From cf38ef7ac27c6762954b7bd884eff373667bcc76 Mon Sep 17 00:00:00 2001 From: white Date: Sat, 18 Oct 2025 12:20:30 +0300 Subject: [PATCH] some strategy selection interface changes --- .../java/com/cherret/zaprett/ui/component/ListItems.kt | 7 ++++++- app/src/main/res/values-ru/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/cherret/zaprett/ui/component/ListItems.kt b/app/src/main/java/com/cherret/zaprett/ui/component/ListItems.kt index c4e8379..9204e91 100644 --- a/app/src/main/java/com/cherret/zaprett/ui/component/ListItems.kt +++ b/app/src/main/java/com/cherret/zaprett/ui/component/ListItems.kt @@ -200,7 +200,7 @@ fun StrategySelectionItem(strategy : StrategyCheckResult, prefs : SharedPreferen elevation = CardDefaults.cardElevation(defaultElevation = 6.dp), colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceContainer), onClick = { - if (strategy.status == StrategyTestingStatus.Completed) { + if (strategy.status == StrategyTestingStatus.Completed && strategy.domains.isNotEmpty()) { expanded = !expanded } }, @@ -283,6 +283,11 @@ fun StrategySelectionItem(strategy : StrategyCheckResult, prefs : SharedPreferen .padding(horizontal = 8.dp) .fillMaxWidth() ) { + if (strategy.domains.isNotEmpty()){ + Text( + text = stringResource(R.string.selection_available_domains) + ) + } LazyColumn(modifier = Modifier.heightIn(max = 300.dp)) { items(strategy.domains) { item -> Card( diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 4026852..80d58fa 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -116,4 +116,5 @@ "В этом разделе настроек приложения представлен перебор стратегий\n Подбор проходит среди скачанных стратегий, поэтому заранее скачайте из репозитория или добавьте из файловой системы интересующие вас стратегии для сравнения. \n Перед началом так же выберете один или несколько листов доменов на вкладке \"Листы\", затем нажмите на \"Начать подбор\". Не используйте для перебора списки с большим количеством доменов." Нет активных листов Не обнаружено активных списков хостов, включите один или несколько, иначе подбор не сработает + Доступные домены \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index afb2522..d941294 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -121,4 +121,5 @@ This section of the application settings allows you to iterate through strategies.\n The selection is based on downloaded strategies, so download the strategies you\'re interested in from the repository or add them from the file system for comparison.\n Before starting, select one or more domain lists in the \"Lists\" tab, then click \"Start selection\". Avoid using lists with a large number of domains. No active hosts No active host lists found, please enable one or more, otherwise the selection will not work + Available domains: \ No newline at end of file