@poolse/react-native 2.0.10 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1476,14 +1476,17 @@ var MessageComposer = forwardRef(
|
|
|
1476
1476
|
const submitDisabled = disabled || sending || isUploading || value.trim().length === 0 && readyAttachmentIds.length === 0;
|
|
1477
1477
|
const handleSend = async () => {
|
|
1478
1478
|
if (submitDisabled) return;
|
|
1479
|
+
const body = value.trim();
|
|
1480
|
+
const replyId = replyingTo?.id;
|
|
1481
|
+
const attachmentIds = readyAttachmentIds;
|
|
1482
|
+
setValue("");
|
|
1483
|
+
upload.reset();
|
|
1479
1484
|
setSending(true);
|
|
1480
1485
|
try {
|
|
1481
|
-
await onSend(
|
|
1482
|
-
...
|
|
1483
|
-
...
|
|
1486
|
+
await onSend(body, {
|
|
1487
|
+
...replyId ? { quoted_message_id: replyId } : {},
|
|
1488
|
+
...attachmentIds.length > 0 ? { attachment_ids: attachmentIds } : {}
|
|
1484
1489
|
});
|
|
1485
|
-
setValue("");
|
|
1486
|
-
upload.reset();
|
|
1487
1490
|
} finally {
|
|
1488
1491
|
setSending(false);
|
|
1489
1492
|
}
|
|
@@ -1804,10 +1807,10 @@ function MessageList({
|
|
|
1804
1807
|
renderItem: handleRender,
|
|
1805
1808
|
onEndReached: hasMore ? onLoadMore : void 0,
|
|
1806
1809
|
onEndReachedThreshold: 0.3,
|
|
1807
|
-
ListHeaderComponent:
|
|
1810
|
+
ListHeaderComponent: ListHeader,
|
|
1808
1811
|
ListFooterComponent: /* @__PURE__ */ jsxs(View, { children: [
|
|
1809
1812
|
hasMore && loading ? /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.colors.ink3, style: { marginVertical: 8 } }) : null,
|
|
1810
|
-
|
|
1813
|
+
ListFooter
|
|
1811
1814
|
] }),
|
|
1812
1815
|
style: { backgroundColor: theme.colors.paper },
|
|
1813
1816
|
contentContainerStyle: { paddingVertical: 8 }
|