summaryrefslogtreecommitdiffhomepage
path: root/android/app/src
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-08-14 12:05:03 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-08-15 10:31:11 +0200
commit4264afea4965653ed1e18da9deab4e4fdb025f1f (patch)
tree62e61123671a6407bc10b0dc41e2beb6361b0626 /android/app/src
parent02236af9f2f9e6c615c4d833f7f95de73bc8fbb0 (diff)
downloadmullvadvpn-4264afea4965653ed1e18da9deab4e4fdb025f1f.tar.xz
mullvadvpn-4264afea4965653ed1e18da9deab4e4fdb025f1f.zip
Fix lint issues
Diffstat (limited to 'android/app/src')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ReadOnlyComposables.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt4
2 files changed, 5 insertions, 3 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ReadOnlyComposables.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ReadOnlyComposables.kt
index 8fe7d44c75..e3a555b1d9 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ReadOnlyComposables.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/ReadOnlyComposables.kt
@@ -3,10 +3,10 @@ package net.mullvad.mullvadvpn.compose.component
import androidx.annotation.StringRes
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
-import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalResources
@Composable
@ReadOnlyComposable
fun textResource(@StringRes id: Int, vararg formatArgs: Any): String {
- return LocalContext.current.resources.getString(id, *formatArgs)
+ return LocalResources.current.getString(id, *formatArgs)
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt
index 5337f9a213..bf8b5913dd 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt
@@ -12,6 +12,7 @@ import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
@@ -115,8 +116,9 @@ fun NegativeConfirmationDialog(
}
},
dismissButton = {
+ val focusRequester = remember { FocusRequester() }
PrimaryButton(
- modifier = Modifier.focusRequester(FocusRequester()),
+ modifier = Modifier.focusRequester(focusRequester),
onClick = onBack,
text = cancelText,
)