feat(deeplink): кнопка поиска в SOVA (re.sova.five, только sideload)

This commit is contained in:
nk
2026-06-08 14:41:42 +03:00
parent c75ff8cb9a
commit ab09d92b0d
3 changed files with 15 additions and 4 deletions

View File

@@ -108,7 +108,11 @@ class PlayerViewModel @Inject constructor(
}
viewModelScope.launch {
settingsRepository.getEnabledDeeplinkServices().collect { ids ->
_enabledServices.value = DeeplinkService.entries.filter { it.serviceId in ids }
_enabledServices.value = DeeplinkService.entries.filter {
it.serviceId in ids &&
// SOVA (сторонний мод ВК) — только в sideload-сборке.
(com.radiola.BuildConfig.SHOW_DEV_TOOLS || it != DeeplinkService.SOVA)
}
}
}
viewModelScope.launch {

View File

@@ -407,7 +407,11 @@ fun SettingsScreen(
.background(colors.surface)
.border(1.dp, colors.border, RoundedCornerShape(16.dp))
) {
DeeplinkService.entries.forEachIndexed { index, service ->
// В store-сборке скрываем SOVA (сторонний мод ВК) — только sideload.
val services = DeeplinkService.entries.filter {
com.radiola.BuildConfig.SHOW_DEV_TOOLS || it != DeeplinkService.SOVA
}
services.forEachIndexed { index, service ->
val checked = service.serviceId in enabledServices
val trackColor by animateColorAsState(
targetValue = if (checked) colors.accent else colors.surface2,
@@ -438,7 +442,7 @@ fun SettingsScreen(
)
)
}
if (index < DeeplinkService.entries.size - 1) {
if (index < services.size - 1) {
HorizontalDivider(
color = colors.border,
modifier = Modifier.padding(horizontal = 16.dp)