Skip to content

Commit

Permalink
Fixed deprecated usage of startActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyPouya committed Nov 16, 2024
1 parent db603aa commit 2c5fcd7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.core.content.ContextCompat.getString
import androidx.core.content.ContextCompat.startActivity
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import com.google.android.material.snackbar.Snackbar
Expand Down Expand Up @@ -109,7 +108,7 @@ private fun handleIntentToDefaultCalendarApp(
)
}
try {
startActivity(context, intent, null)
context.startActivity(intent, null)
} catch (e: ActivityNotFoundException) {
e.printStackTrace()
Snackbar.make(
Expand Down

0 comments on commit 2c5fcd7

Please sign in to comment.