Skip to content

Commit

Permalink
use safe cast to enable enableEdgeToEdge
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejo committed Feb 6, 2025
1 parent 8476d42 commit 3ae16d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import javax.inject.Inject

class ApplicationEdgeToEdgeEnabler @Inject constructor() : Application.ActivityLifecycleCallbacks {
override fun onActivityCreated(activity: Activity, bindle: Bundle?) {
(activity as ComponentActivity).enableEdgeToEdge()
(activity as? ComponentActivity)?.enableEdgeToEdge()
}

override fun onActivityStarted(activity: Activity) {
Expand Down

0 comments on commit 3ae16d0

Please sign in to comment.