Skip to content
TypeScript

fix(android): preserve styled text in incoming shares (#22359)

Victor Vogelfa81facb92fd
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index f5c1c652181..a49c3856864 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -176,7 +176,8 @@
"@react-native-menu/menu",
"expo-audio",
"expo-video",
- "expo-network"
+ "expo-network",
+ "expo-sharing"
]
}
},
diff --git a/patches/[email protected] b/patches/[email protected]
index 3084d8e0062..82aebb0751e 100644
--- a/patches/[email protected]
+++ b/patches/[email protected]
@@ -82,7 +82,7 @@ index 3381c5fd207ebb4cd8e0301aac59d307939ff162..481cdb4bc64ea5ae49919071f686324f
-
- listOf(
+ val stream = intent.getParcelableExtraCompat<Uri>(Intent.EXTRA_STREAM)
-+ val text = intent.getStringExtra(Intent.EXTRA_TEXT)
++ val text = intent.getCharSequenceExtra(Intent.EXTRA_TEXT)?.toString()
+ if (stream == null) {
+ if (!type.startsWith("text/") || text == null) return emptyList()
+ return listOf(
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9cf8a3f0c53..fb4789ac814 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -377,7 +377,7 @@ patchedDependencies:
[email protected]: 530af071088a809fe1a97ce2b2269c78335fbb5dcd3893d6937ff5c304c85a0a
[email protected]: f0b0fd100550ed76e5c25b4d13eb7c9ff62825f8f197c53edf7bf447c50c9fb7
[email protected]: cd09b6d1744dde4efa081b5619ebcff38877d98f7502a51cab121629dece8237
- [email protected]: dcdc534eeb18eb9fb0919c0ff7da1f7a75076b5b38b57f231cad32bb17c9dda3
+ [email protected]: 321a86e1471e34c53f1f2937fbb4304ea3f7b7a78ad9e4d35febc2b9e73e9688
[email protected]: e80ec3ef8c4af50a607beea1c0917e71ba679844efdb702b45d17a5f03cf466c
[email protected]: 8bf49067f93742855e15f29559ac75c8b50230b47069060993c9ea01dac11171
[email protected]: afe6b2c89e1eaddfd3c90cf2723f12c9a17d513e65beff51653781486013251c
@@ -704,7 +704,7 @@ importers:
expo-sharing:
specifier: 58.0.19
expo-splash-screen:
specifier: ~58.0.10
@@ -18647,7 +18647,7 @@ snapshots:
dependencies:
'@expo/config-plugins': 58.0.9(@tsc-rs/[email protected])([email protected])
'@expo/config-types': 58.0.3