Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 2438f1a8 authored by Arnau Mora's avatar Arnau Mora Committed by GitHub
Browse files

Replaced `LocalContext` casting with `LocalActivity` (#1261)



Signed-off-by: default avatarArnau Mora <arnyminerz@proton.me>
parent 331f8d57
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@

package at.bitfire.davdroid.ui.composable

import android.app.Activity
import android.os.Build
import android.security.KeyChain
import androidx.activity.compose.LocalActivity
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Card
@@ -19,7 +19,6 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@@ -46,7 +45,7 @@ fun SelectClientCertificateCard(
                modifier = Modifier.padding(8.dp)
            )

            val activity = LocalContext.current as? Activity
            val activity = LocalActivity.current
            val scope = rememberCoroutineScope()
            OutlinedButton(
                enabled = enabled,