mirror of
https://github.com/florisboard/florisboard.git
synced 2024-09-19 11:32:18 +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)
|
||||
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
|
||||
return
|
||||
}
|
||||
@ -195,7 +195,7 @@ class FlorisAppActivity : ComponentActivity() {
|
||||
LaunchedEffect(intentToBeHandled) {
|
||||
val intent = intentToBeHandled
|
||||
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)
|
||||
} else {
|
||||
val data = if (intent.action == Intent.ACTION_VIEW) {
|
||||
|
Loading…
Reference in New Issue
Block a user