mirror of
https://github.com/florisboard/florisboard.git
synced 2024-09-19 19:42:20 +02:00
Fix null ptr exception in intent handling
This commit is contained in:
parent
6da6da74fc
commit
0450c8c7a1
@ -145,7 +145,7 @@ class FlorisAppActivity : ComponentActivity() {
|
|||||||
super.onNewIntent(intent)
|
super.onNewIntent(intent)
|
||||||
setIntent(intent)
|
setIntent(intent)
|
||||||
|
|
||||||
if (intent?.action == Intent.ACTION_VIEW && intent.categories.contains(Intent.CATEGORY_BROWSABLE)) {
|
if (intent?.action == Intent.ACTION_VIEW && intent.categories?.contains(Intent.CATEGORY_BROWSABLE) == true) {
|
||||||
intentToBeHandled = intent
|
intentToBeHandled = intent
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -195,7 +195,7 @@ class FlorisAppActivity : ComponentActivity() {
|
|||||||
LaunchedEffect(intentToBeHandled) {
|
LaunchedEffect(intentToBeHandled) {
|
||||||
val intent = intentToBeHandled
|
val intent = intentToBeHandled
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
if (intent.action == Intent.ACTION_VIEW && intent.categories.contains(Intent.CATEGORY_BROWSABLE)) {
|
if (intent.action == Intent.ACTION_VIEW && intent.categories?.contains(Intent.CATEGORY_BROWSABLE) == true) {
|
||||||
navController.handleDeepLink(intent)
|
navController.handleDeepLink(intent)
|
||||||
} else {
|
} else {
|
||||||
val data = if (intent.action == Intent.ACTION_VIEW) {
|
val data = if (intent.action == Intent.ACTION_VIEW) {
|
||||||
|
Loading…
Reference in New Issue
Block a user