diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/communication/CustomListAction.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/communication/CustomListAction.kt index d9bf076e547f..0b478f5272f4 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/communication/CustomListAction.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/communication/CustomListAction.kt @@ -3,11 +3,11 @@ package net.mullvad.mullvadvpn.compose.communication import android.os.Parcelable import kotlinx.parcelize.Parcelize -sealed interface -CustomListAction : Parcelable { +sealed interface CustomListAction : Parcelable { @Parcelize - data class Rename(val customListId: String, val name: String, val newName: String) : CustomListAction { + data class Rename(val customListId: String, val name: String, val newName: String) : + CustomListAction { fun not() = this.copy(name = newName, newName = name) } @@ -17,10 +17,8 @@ CustomListAction : Parcelable { } @Parcelize - data class Create( - val name: String = "", - val locations: List = emptyList() - ) : CustomListAction, Parcelable { + data class Create(val name: String = "", val locations: List = emptyList()) : + CustomListAction, Parcelable { fun not(customListId: String) = Delete(customListId) } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateCustomListDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateCustomListDialog.kt index be3f2e763a3c..3c53f829ce57 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateCustomListDialog.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/CreateCustomListDialog.kt @@ -58,9 +58,7 @@ fun CreateCustomList( locationCode: String = "" ) { val vm: CreateCustomListDialogViewModel = - koinViewModel( - parameters = { parametersOf(locationCode) } - ) + koinViewModel(parameters = { parametersOf(locationCode) }) LaunchedEffect(key1 = Unit) { vm.uiSideEffect.collect { sideEffect -> when (sideEffect) { diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepository.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepository.kt index 46909fb53af1..4a0ce06efcbe 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepository.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepository.kt @@ -11,9 +11,7 @@ import net.mullvad.mullvadvpn.model.CustomList import net.mullvad.mullvadvpn.model.CustomListsError import net.mullvad.mullvadvpn.model.GeographicLocationConstraint import net.mullvad.mullvadvpn.model.UpdateCustomListResult -import net.mullvad.mullvadvpn.relaylist.RelayItem import net.mullvad.mullvadvpn.relaylist.getGeographicLocationConstraintByCode -import net.mullvad.mullvadvpn.relaylist.toGeographicLocationConstraints import net.mullvad.mullvadvpn.ui.serviceconnection.RelayListListener import net.mullvad.mullvadvpn.util.firstOrNullWithTimeout