|
|
|
|
@ -249,7 +249,7 @@ private fun RadioPttButton(
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Единый выбор входа/выхода, VAD и плавающая PTT-кнопка. */ |
|
|
|
|
/* Единый выбор входа/выхода, PTT громкостью, VAD и плавающая PTT-кнопка. */ |
|
|
|
|
@Composable |
|
|
|
|
private fun RadioSourceBar(viewModel: ChatViewModel) { |
|
|
|
|
val radioAuto by viewModel.radioAuto.collectAsState() |
|
|
|
|
@ -261,6 +261,7 @@ private fun RadioSourceBar(viewModel: ChatViewModel) {
|
|
|
|
|
val scope = rememberCoroutineScope() |
|
|
|
|
val overlayEnabled by provider.radioOverlayEnabled.collectAsState(initial = provider.getRadioOverlay()) |
|
|
|
|
val vadEnabled by provider.radioVadEnabled.collectAsState(initial = provider.getInt("radio.vad_enabled") != 0) |
|
|
|
|
val volumePttEnabled by provider.radioVolumePttEnabled.collectAsState(initial = provider.getRadioVolumePtt()) |
|
|
|
|
val overlayShown by RadioOverlayService.isShown.collectAsState() |
|
|
|
|
val overlayStatus by RadioOverlayService.status.collectAsState() |
|
|
|
|
|
|
|
|
|
@ -300,6 +301,9 @@ private fun RadioSourceBar(viewModel: ChatViewModel) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
VerticalDivider(modifier = Modifier.height(32.dp), color = Color(0xFF344550)) |
|
|
|
|
RadioControlButton(Icons.AutoMirrored.Filled.VolumeUp, stringResource(R.string.volume_ptt), volumePttEnabled) { |
|
|
|
|
viewModel.setRadioVolumePtt(!volumePttEnabled) |
|
|
|
|
} |
|
|
|
|
RadioControlButton(null, stringResource(if (vadEnabled) R.string.disable_vad else R.string.enable_vad), |
|
|
|
|
vadEnabled, text = stringResource(R.string.vad_button)) { |
|
|
|
|
viewModel.setRadioVad(!vadEnabled) |
|
|
|
|
|