From 5331e5312e40e9d33994f37033ee457e947b7864 Mon Sep 17 00:00:00 2001 From: Jonatan Rhodin Date: Wed, 5 Jun 2024 09:19:38 +0200 Subject: [PATCH] More feedback improvements --- .../mullvadvpn/viewmodel/EditApiAccessMethodViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/EditApiAccessMethodViewModel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/EditApiAccessMethodViewModel.kt index c09054943a39..d957882874b9 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/EditApiAccessMethodViewModel.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/EditApiAccessMethodViewModel.kt @@ -155,7 +155,7 @@ class EditApiAccessMethodViewModel( } private fun setUpInitialData(accessMethod: ApiAccessMethod) { - with( + val initialFormData = when (val customProxy = accessMethod.apiAccessMethodType) { ApiAccessMethodType.Bridges, ApiAccessMethodType.Direct -> @@ -179,7 +179,7 @@ class EditApiAccessMethodViewModel( password = customProxy.auth?.password ?: "" ) } - ) { + with(initialFormData) { formData.value = this initialData = this }