From f5612504f5ac9e67a8dcdcc3c20fe0ff3a11ac0c Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Wed, 19 Jul 2023 20:49:05 +0400 Subject: [PATCH] android: correctly apply disable conditions to switch/abort switch buttons (#2726) --- .../src/main/java/chat/simplex/app/views/chat/ChatInfoView.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/multiplatform/android/src/main/java/chat/simplex/app/views/chat/ChatInfoView.kt b/apps/multiplatform/android/src/main/java/chat/simplex/app/views/chat/ChatInfoView.kt index 0f22ef5ac6..4cfd721958 100644 --- a/apps/multiplatform/android/src/main/java/chat/simplex/app/views/chat/ChatInfoView.kt +++ b/apps/multiplatform/android/src/main/java/chat/simplex/app/views/chat/ChatInfoView.kt @@ -495,7 +495,7 @@ fun SimplexServers(text: String, servers: List) { @Composable fun SwitchAddressButton(disabled: Boolean, switchAddress: () -> Unit) { - SectionItemView(switchAddress) { + SectionItemView(switchAddress, disabled = disabled) { Text( stringResource(MR.strings.switch_receiving_address), color = if (disabled) MaterialTheme.colors.secondary else MaterialTheme.colors.primary @@ -505,7 +505,7 @@ fun SwitchAddressButton(disabled: Boolean, switchAddress: () -> Unit) { @Composable fun AbortSwitchAddressButton(disabled: Boolean, abortSwitchAddress: () -> Unit) { - SectionItemView(abortSwitchAddress) { + SectionItemView(abortSwitchAddress, disabled = disabled) { Text( stringResource(MR.strings.abort_switch_receiving_address), color = if (disabled) MaterialTheme.colors.secondary else MaterialTheme.colors.primary