diff --git a/package.json b/package.json index 574ca2639d..5e1394c2cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bsky.app", - "version": "1.96.1", + "version": "1.96.2", "private": true, "engines": { "node": ">=20" @@ -69,7 +69,7 @@ "@fortawesome/free-regular-svg-icons": "^6.1.1", "@fortawesome/free-solid-svg-icons": "^6.1.1", "@fortawesome/react-native-fontawesome": "^0.3.2", - "@haileyok/bluesky-video": "0.2.4", + "@haileyok/bluesky-video": "0.2.5", "@ipld/dag-cbor": "^9.2.0", "@lingui/react": "^4.14.1", "@mattermost/react-native-paste-input": "^0.7.1", diff --git a/patches/expo-media-library+17.0.3.patch b/patches/expo-media-library+17.0.3.patch new file mode 100644 index 0000000000..c7bb6b000c --- /dev/null +++ b/patches/expo-media-library+17.0.3.patch @@ -0,0 +1,19 @@ +diff --git a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.kt b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.kt +index b928b8f..7175cf6 100644 +--- a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.kt ++++ b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.kt +@@ -99,12 +99,12 @@ class MediaLibraryModule : Module() { + } + + AsyncFunction("createAssetAsync") { localUri: String, promise: Promise -> +- throwUnlessPermissionsGranted { ++ //throwUnlessPermissionsGranted { + withModuleScope(promise) { + CreateAsset(context, localUri, promise) + .execute() + } +- } ++ //} + } + + AsyncFunction("addAssetsToAlbumAsync") { assetsId: List, albumId: String, copyToAlbum: Boolean, promise: Promise -> diff --git a/src/screens/Messages/components/MessageInput.web.tsx b/src/screens/Messages/components/MessageInput.web.tsx index 72e0382a93..bac163685a 100644 --- a/src/screens/Messages/components/MessageInput.web.tsx +++ b/src/screens/Messages/components/MessageInput.web.tsx @@ -3,6 +3,7 @@ import {Pressable, StyleSheet, View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import Graphemer from 'graphemer' +import {flushSync} from 'react-dom' import TextareaAutosize from 'react-textarea-autosize' import {isSafari, isTouchDevice} from '#/lib/browser' @@ -106,11 +107,19 @@ export function MessageInput({ const onEmojiInserted = React.useCallback( (emoji: Emoji) => { - const position = textAreaRef.current?.selectionStart ?? 0 - setMessage( - message => - message.slice(0, position) + emoji.native + message.slice(position), - ) + if (!textAreaRef.current) { + return + } + const position = textAreaRef.current.selectionStart ?? 0 + textAreaRef.current.focus() + flushSync(() => { + setMessage( + message => + message.slice(0, position) + emoji.native + message.slice(position), + ) + }) + textAreaRef.current.selectionStart = position + emoji.native.length + textAreaRef.current.selectionEnd = position + emoji.native.length }, [setMessage], ) @@ -148,7 +157,14 @@ export function MessageInput({