summaryrefslogtreecommitdiffhomepage
path: root/android/app/src/main
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-07-31 16:09:19 +0200
committerAlbin <albin@mullvad.net>2023-08-01 11:45:31 +0200
commit00757be3b95aa7039d502c0d7ef015e25b9b9d2a (patch)
treec02d78a3ad756d540f10ea4ff4e17b8d920929c8 /android/app/src/main
parentd30da2ebd4badcff031320957c3e244986648aae (diff)
downloadmullvadvpn-00757be3b95aa7039d502c0d7ef015e25b9b9d2a.tar.xz
mullvadvpn-00757be3b95aa7039d502c0d7ef015e25b9b9d2a.zip
Fix connect button flickering
Diffstat (limited to 'android/app/src/main')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt28
1 files changed, 7 insertions, 21 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt
index ad483165f8..e6424a1674 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt
@@ -28,7 +28,6 @@ import net.mullvad.mullvadvpn.compose.theme.AlphaInactive
import net.mullvad.mullvadvpn.compose.theme.AppTheme
import net.mullvad.mullvadvpn.compose.theme.Dimens
import net.mullvad.mullvadvpn.model.TunnelState
-import net.mullvad.talpid.tunnel.ActionAfterDisconnect
@Composable
fun ConnectionButton(
@@ -43,26 +42,13 @@ fun ConnectionButton(
when (state) {
is TunnelState.Disconnected -> ConnectButton(modifier = modifier, onClick = connectClick)
is TunnelState.Disconnecting -> {
- when (state.actionAfterDisconnect) {
- ActionAfterDisconnect.Nothing ->
- ConnectButton(modifier = modifier, onClick = connectClick)
- ActionAfterDisconnect.Block ->
- DisconnectButton(
- modifier = modifier,
- text = stringResource(id = R.string.disconnect),
- mainClick = connectClick,
- reconnectClick = reconnectClick,
- reconnectButtonTestTag = reconnectButtonTestTag
- )
- ActionAfterDisconnect.Reconnect ->
- DisconnectButton(
- modifier = modifier,
- text = stringResource(id = R.string.disconnect),
- mainClick = connectClick,
- reconnectClick = reconnectClick,
- reconnectButtonTestTag = reconnectButtonTestTag
- )
- }
+ DisconnectButton(
+ modifier = modifier,
+ text = stringResource(id = R.string.disconnect),
+ mainClick = connectClick,
+ reconnectClick = reconnectClick,
+ reconnectButtonTestTag = reconnectButtonTestTag
+ )
}
is TunnelState.Connecting ->
DisconnectButton(