diff options
| author | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2025-08-04 17:04:50 +0200 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2025-08-08 13:04:00 +0200 |
| commit | b82153a408f035155c5a26fb68fcaa09e428ca2c (patch) | |
| tree | eb8e89e724ea6ca5403c1c38dce4eb846702e823 /android/lib | |
| parent | 6dee63b6cb3e7dbf9e0d6c77d20a3a6e0dba0de1 (diff) | |
| download | mullvadvpn-b82153a408f035155c5a26fb68fcaa09e428ca2c.tar.xz mullvadvpn-b82153a408f035155c5a26fb68fcaa09e428ca2c.zip | |
Replace select hop code with use cases
Also split the select hop code into select hop and modify multihop
Refactor relay list type
Diffstat (limited to 'android/lib')
| -rw-r--r-- | android/lib/resource/src/main/res/values/strings.xml | 3 | ||||
| -rw-r--r-- | android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/android/lib/resource/src/main/res/values/strings.xml b/android/lib/resource/src/main/res/values/strings.xml index abff8ca10c..c58d62fc03 100644 --- a/android/lib/resource/src/main/res/values/strings.xml +++ b/android/lib/resource/src/main/res/values/strings.xml @@ -433,4 +433,7 @@ <string name="no_recent_selection">No recent selection history</string> <string name="recents_disabled">Recents disabled and history cleared</string> <string name="more_actions">More actions</string> + <string name="relay_item_already_selected_as_exit">%s is already selected as exit relay</string> + <string name="relay_item_already_selected_as_entry">%s is already selected as entry relay</string> + <string name="entry_and_exit_are_same">Entry relay is the same as exit relay</string> </resources> diff --git a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt index 8c38610f9e..76fb8e2f33 100644 --- a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt +++ b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/SelectableRelayListItem.kt @@ -38,7 +38,6 @@ import net.mullvad.mullvadvpn.lib.resource.R import net.mullvad.mullvadvpn.lib.theme.AppTheme import net.mullvad.mullvadvpn.lib.theme.Dimens import net.mullvad.mullvadvpn.lib.theme.color.AlphaVisible -import net.mullvad.mullvadvpn.lib.theme.color.selected import net.mullvad.mullvadvpn.lib.ui.component.ExpandChevron import net.mullvad.mullvadvpn.lib.ui.designsystem.RelayListItem import net.mullvad.mullvadvpn.lib.ui.designsystem.RelayListItemDefaults @@ -118,10 +117,7 @@ fun SelectableRelayListItem( ) } }, - onClick = - if (relayListItem.state == null) onClick - /* Workaround for not allowing to select relay that is currently used as entry or exit */ - else ({}), + onClick = onClick, onLongClick = onLongClick, trailingContent = if (relayListItem.canExpand) { |
