Skip to content
TypeScript

fix(mobile): describe when composer view commands can reject (#25516)

Julius Marminge87ea18cad91f
diff --git a/apps/mobile/src/native/T3ComposerEditor.ios.tsx b/apps/mobile/src/native/T3ComposerEditor.ios.tsx
index 4698088b5c0..2839ee51ce4 100644
--- a/apps/mobile/src/native/T3ComposerEditor.ios.tsx
+++ b/apps/mobile/src/native/T3ComposerEditor.ios.tsx
@@ -111,8 +111,9 @@ interface NativeComposerEditorProps extends ViewProps {
const NativeView = requireNativeView<NativeComposerEditorProps>(NATIVE_MODULE_NAME);
-// Fabric does not mount a `display: none` subtree, so a command sent while the composer slot is
-// hidden (an open question) rejects with "Unable to find the view". There is nothing to act on.
+// A view command rejects with "Unable to find the view" when the composer's native view is
+// unmounted, which can happen while an open question hides the composer slot. There is nothing
+// to act on then.
function settleViewCommand(command: Promise<void> | undefined): void {
command?.catch(() => undefined);
}
diff --git a/apps/mobile/src/native/T3ComposerEditor.native.tsx b/apps/mobile/src/native/T3ComposerEditor.native.tsx
index 1351789658b..beec603e47d 100644
--- a/apps/mobile/src/native/T3ComposerEditor.native.tsx
+++ b/apps/mobile/src/native/T3ComposerEditor.native.tsx
@@ -110,8 +110,9 @@ interface NativeComposerEditorProps extends ViewProps {
const NativeView = requireNativeView<NativeComposerEditorProps>(NATIVE_MODULE_NAME);
-// Fabric does not mount a `display: none` subtree, so a command sent while the composer slot is
-// hidden (an open question) rejects with "Unable to find the view". There is nothing to act on.
+// A view command rejects with "Unable to find the view" when the composer's native view is
+// unmounted, which can happen while an open question hides the composer slot. There is nothing
+// to act on then.
function settleViewCommand(command: Promise<void> | undefined): void {
command?.catch(() => undefined);
}