Skip to content

Commit

Permalink
Kotlin format
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Mar 1, 2024
1 parent 4a8e8a8 commit 56ae29d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -17,10 +17,8 @@ CustomListAction : Parcelable {
}

@Parcelize
data class Create(
val name: String = "",
val locations: List<String> = emptyList()
) : CustomListAction, Parcelable {
data class Create(val name: String = "", val locations: List<String> = emptyList()) :
CustomListAction, Parcelable {
fun not(customListId: String) = Delete(customListId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 56ae29d

Please sign in to comment.