Skip to content

Commit

Permalink
Replaced LocalContext casting with LocalActivity
Browse files Browse the repository at this point in the history
Signed-off-by: Arnau Mora <[email protected]>
  • Loading branch information
ArnyminerZ committed Jan 22, 2025
1 parent 331f8d5 commit a25a436
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit a25a436

Please sign in to comment.