diff options
| author | David Göransson <david.goransson@mullvad.net> | 2025-05-07 08:39:02 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2025-05-07 09:28:12 +0200 |
| commit | 54106616fd902462ae124d8650801024dce096f5 (patch) | |
| tree | 20ba4df3956758a52e2ee9a743869589bc5cbfe1 /android/app/src | |
| parent | d0d1f86e09411c6f53440dad1109b1232638419b (diff) | |
| download | mullvadvpn-54106616fd902462ae124d8650801024dce096f5.tar.xz mullvadvpn-54106616fd902462ae124d8650801024dce096f5.zip | |
Fix lint warning of using LocalContext to get Configuration
Diffstat (limited to 'android/app/src')
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreen.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreen.kt index c2c3a72c35..b41a95d64e 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/SelectLocationScreen.kt @@ -32,6 +32,7 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.stringResource @@ -372,7 +373,8 @@ private fun RelayLists( ) { // This is a workaround for the HorizontalPager being broken on Android TV when it contains // focusable views and you navigate with the D-pad. Remove this code once DROID-1639 is fixed. - val configuration = LocalContext.current.resources.configuration + val configuration = LocalConfiguration.current + if (configuration.navigation == Configuration.NAVIGATION_DPAD) { SelectLocationList( backgroundColor = backgroundColor, |
