diff options
| author | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2024-02-08 11:17:02 +0100 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2024-02-08 11:17:02 +0100 |
| commit | ec4c473c5c08e30e16822a8a82531d3ff5a1135f (patch) | |
| tree | ad2ced90d3ece795a71a004a6006c377c04c1bf0 /android/lib/common | |
| parent | 1b80203504f58fab47dc6dbe53f223084acecc6a (diff) | |
| parent | af3df963648d4cc535b552f75cf3abdfe936b395 (diff) | |
| download | mullvadvpn-ec4c473c5c08e30e16822a8a82531d3ff5a1135f.tar.xz mullvadvpn-ec4c473c5c08e30e16822a8a82531d3ff5a1135f.zip | |
Merge branch 'add-support-for-custom-list-in-the-app-layer-droid-653'
Diffstat (limited to 'android/lib/common')
| -rw-r--r-- | android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/LocationConstraintExtensions.kt | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/LocationConstraintExtensions.kt b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/LocationConstraintExtensions.kt deleted file mode 100644 index d845e3aba9..0000000000 --- a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/LocationConstraintExtensions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package net.mullvad.mullvadvpn.lib.common.util - -import net.mullvad.mullvadvpn.model.Constraint -import net.mullvad.mullvadvpn.model.GeographicLocationConstraint -import net.mullvad.mullvadvpn.model.LocationConstraint - -fun LocationConstraint.toGeographicLocationConstraint(): GeographicLocationConstraint? = - when (this) { - is LocationConstraint.Location -> this.location - is LocationConstraint.CustomList -> null - } - -fun Constraint<LocationConstraint>.toGeographicLocationConstraint(): - Constraint<GeographicLocationConstraint> = - when (this) { - is Constraint.Only -> - when (value) { - is LocationConstraint.Location -> - Constraint.Only((value as LocationConstraint.Location).location) - is LocationConstraint.CustomList -> Constraint.Any() - } - is Constraint.Any -> Constraint.Any() - } |
