stream-chat-react-native-core 8.3.3 → 8.4.0-beta.1
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/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +4 -2
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +3 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +11 -22
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +4 -2
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +3 -1
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +11 -22
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +4 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +4 -0
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +19 -10
- package/src/components/MessageInput/MessageInput.tsx +11 -2
- package/src/components/MessageList/MessageList.tsx +10 -42
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +310 -344
- package/src/version.json +1 -1
- package/lib/commonjs/mock-builders/native/react-native-mock.js +0 -2
- package/lib/commonjs/mock-builders/native/react-native-mock.js.map +0 -1
- package/lib/module/mock-builders/native/react-native-mock.js +0 -2
- package/lib/module/mock-builders/native/react-native-mock.js.map +0 -1
- package/src/mock-builders/native/react-native-mock.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageInput/MessageInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageInput/MessageInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,EAAmC,SAAS,EAAE,cAAc,EAAQ,MAAM,cAAc,CAAC;AAsBhG,OAAO,EAAE,gBAAgB,EAA6C,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EACL,4BAA4B,EAE7B,MAAM,gEAAgE,CAAC;AACxE,OAAO,EACL,mBAAmB,EAEpB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,8BAA8B,EAE/B,MAAM,iEAAiE,CAAC;AAIzE,OAAO,EACL,wBAAwB,EAEzB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,oBAAoB,EAErB,MAAM,gDAAgD,CAAC;AAGxD,OAAO,EACL,uBAAuB,EAExB,MAAM,sDAAsD,CAAC;AAkD9D,KAAK,4BAA4B,GAAG,IAAI,CACtC,4BAA4B,EAC5B,aAAa,GAAG,gBAAgB,CACjC,GACC,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAClC,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC,GAC5E,IAAI,CACF,wBAAwB,EACtB,0BAA0B,GAC1B,uBAAuB,GACvB,2BAA2B,GAC3B,mCAAmC,GACnC,oCAAoC,GACpC,+BAA+B,GAC/B,mCAAmC,GACnC,8BAA8B,GAC9B,8BAA8B,GAC9B,6BAA6B,GAC7B,eAAe,GACf,0BAA0B,GAC1B,6BAA6B,GAC7B,uBAAuB,GACvB,4BAA4B,GAC5B,gBAAgB,GAChB,eAAe,GACf,uBAAuB,GACvB,sBAAsB,GACtB,OAAO,GACP,aAAa,GACb,cAAc,GACd,yBAAyB,GACzB,oBAAoB,GACpB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,2BAA2B,GAC3B,cAAc,GACd,uBAAuB,GACvB,YAAY,GACZ,kCAAkC,GAClC,2BAA2B,GAC3B,eAAe,GACf,wBAAwB,GACxB,yBAAyB,GACzB,wBAAwB,GACxB,aAAa,GACb,mBAAmB,GACnB,4BAA4B,CAC/B,GACD,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,GACnC,IAAI,CAAC,uBAAuB,EAAE,GAAG,CAAC,GAClC,IAAI,CAAC,8BAA8B,EAAE,mBAAmB,CAAC,GAAG;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,KAAK,CAAC,aAAa,CACtC,cAAc,GAAG;QACf,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;KACvC,CACF,CAAC;CACH,CAAC;AAyiBJ,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAEtE;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;YAAW,iBAAiB;;CAoIpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageList/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,EACL,aAAa,EACb,QAAQ,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageList/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,EACL,aAAa,EACb,QAAQ,IAAI,YAAY,EACxB,eAAe,EAKhB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAkB,YAAY,EAAmB,MAAM,aAAa,CAAC;AAUjF,OAAO,EACL,4BAA4B,EAE7B,MAAM,gEAAgE,CAAC;AACxE,OAAO,EACL,mBAAmB,EAEpB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAkB,MAAM,wCAAwC,CAAC;AAE1F,OAAO,EACL,wBAAwB,EAEzB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,oBAAoB,EAErB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,gCAAgC,EAEjC,MAAM,wEAAwE,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAoB,MAAM,4CAA4C,CAAC;AA0ElG,KAAK,2BAA2B,GAAG,IAAI,CACrC,4BAA4B,EAC5B,aAAa,GAAG,gBAAgB,GAAG,mBAAmB,CACvD,GACC,IAAI,CACF,mBAAmB,EACjB,SAAS,GACT,oBAAoB,GACpB,UAAU,GACV,qBAAqB,GACrB,sBAAsB,GACtB,sBAAsB,GACtB,0BAA0B,GAC1B,SAAS,GACT,kBAAkB,GAClB,UAAU,GACV,sBAAsB,GACtB,eAAe,GACf,8BAA8B,GAC9B,uBAAuB,GACvB,oBAAoB,GACpB,cAAc,GACd,iBAAiB,GACjB,YAAY,CACf,GACD,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAChC,IAAI,CAAC,wBAAwB,EAAE,aAAa,CAAC,GAC7C,IAAI,CAAC,gCAAgC,EAAE,UAAU,GAAG,gBAAgB,CAAC,GACrE,IAAI,CACF,oBAAoB,EAClB,YAAY,GACZ,wBAAwB,GACxB,UAAU,GACV,qBAAqB,GACrB,uBAAuB,GACvB,iCAAiC,GACjC,SAAS,GACT,sBAAsB,GACtB,eAAe,GACf,gBAAgB,GAChB,0BAA0B,GAC1B,iBAAiB,GACjB,0BAA0B,GAC1B,4BAA4B,CAC/B,GACD,IAAI,CACF,kBAAkB,EAClB,sBAAsB,GAAG,gBAAgB,GAAG,QAAQ,GAAG,gBAAgB,CACxE,GAAG;IACF;;;;;;;;;;;;;OAaG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/D;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACtC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACtC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACjE;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,CAAC,YAAY,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CACnE,CAAC;AAghCJ,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAEpE,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,sBAoGlD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native-core",
|
|
3
3
|
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.4.0-beta.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -118,13 +118,13 @@
|
|
|
118
118
|
"@types/linkify-it": "5.0.0",
|
|
119
119
|
"@types/lodash": "4.17.16",
|
|
120
120
|
"@types/mime-types": "2.1.4",
|
|
121
|
-
"@types/react": "^19.
|
|
122
|
-
"@types/react-test-renderer": "19.
|
|
121
|
+
"@types/react": "^19.1.0",
|
|
122
|
+
"@types/react-test-renderer": "19.1.0",
|
|
123
123
|
"@types/ungap__structured-clone": "^1.2.0",
|
|
124
124
|
"@types/use-sync-external-store": "^1.5.0",
|
|
125
125
|
"@types/uuid": "^10.0.0",
|
|
126
126
|
"babel-eslint": "10.1.0",
|
|
127
|
-
"babel-jest": "
|
|
127
|
+
"babel-jest": "30.0.0",
|
|
128
128
|
"babel-loader": "10.0.0",
|
|
129
129
|
"babel-plugin-module-resolver": "5.0.2",
|
|
130
130
|
"better-sqlite3": "11.10.0",
|
|
@@ -142,19 +142,19 @@
|
|
|
142
142
|
"jest": "^30.0.0",
|
|
143
143
|
"moment-timezone": "^0.6.0",
|
|
144
144
|
"prettier": "^3.5.3",
|
|
145
|
-
"react": "19.
|
|
146
|
-
"react-native": "0.
|
|
145
|
+
"react": "19.1.0",
|
|
146
|
+
"react-native": "0.80.2",
|
|
147
147
|
"react-native-builder-bob": "0.40.11",
|
|
148
|
-
"react-native-gesture-handler": "^2.
|
|
148
|
+
"react-native-gesture-handler": "^2.26.0",
|
|
149
149
|
"react-native-reanimated": "3.18.0",
|
|
150
150
|
"react-native-svg": "15.12.0",
|
|
151
|
-
"react-test-renderer": "19.
|
|
151
|
+
"react-test-renderer": "19.1.0",
|
|
152
152
|
"rimraf": "^6.0.1",
|
|
153
153
|
"typescript": "5.8.3",
|
|
154
154
|
"typescript-eslint": "^8.34.0",
|
|
155
155
|
"uuid": "^11.1.0"
|
|
156
156
|
},
|
|
157
157
|
"resolutions": {
|
|
158
|
-
"@types/react": "^19.
|
|
158
|
+
"@types/react": "^19.1.0"
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
I18nManager,
|
|
4
|
-
|
|
4
|
+
TextInput as RNTextInput,
|
|
5
5
|
StyleSheet,
|
|
6
|
-
|
|
7
|
-
TextInputContentSizeChangeEventData,
|
|
6
|
+
TextInputContentSizeChangeEvent,
|
|
8
7
|
TextInputProps,
|
|
9
|
-
|
|
8
|
+
TextInputSelectionChangeEvent,
|
|
10
9
|
} from 'react-native';
|
|
11
10
|
|
|
12
11
|
import { MessageComposerConfig, TextComposerState } from 'stream-chat';
|
|
@@ -37,6 +36,11 @@ type AutoCompleteInputPropsWithContext = TextInputProps &
|
|
|
37
36
|
* that would happen if we put this in the MessageInputContext
|
|
38
37
|
*/
|
|
39
38
|
cooldownActive?: boolean;
|
|
39
|
+
TextInputComponent?: React.ComponentType<
|
|
40
|
+
TextInputProps & {
|
|
41
|
+
ref: React.Ref<RNTextInput> | undefined;
|
|
42
|
+
}
|
|
43
|
+
>;
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
type AutoCompleteInputProps = Partial<AutoCompleteInputPropsWithContext>;
|
|
@@ -53,7 +57,14 @@ const configStateSelector = (state: MessageComposerConfig) => ({
|
|
|
53
57
|
const MAX_NUMBER_OF_LINES = 5;
|
|
54
58
|
|
|
55
59
|
const AutoCompleteInputWithContext = (props: AutoCompleteInputPropsWithContext) => {
|
|
56
|
-
const {
|
|
60
|
+
const {
|
|
61
|
+
channel,
|
|
62
|
+
cooldownActive = false,
|
|
63
|
+
setInputBoxRef,
|
|
64
|
+
t,
|
|
65
|
+
TextInputComponent = RNTextInput,
|
|
66
|
+
...rest
|
|
67
|
+
} = props;
|
|
57
68
|
const [localText, setLocalText] = useState('');
|
|
58
69
|
const [textHeight, setTextHeight] = useState(0);
|
|
59
70
|
const messageComposer = useMessageComposer();
|
|
@@ -74,7 +85,7 @@ const AutoCompleteInputWithContext = (props: AutoCompleteInputPropsWithContext)
|
|
|
74
85
|
}, [text]);
|
|
75
86
|
|
|
76
87
|
const handleSelectionChange = useCallback(
|
|
77
|
-
(e:
|
|
88
|
+
(e: TextInputSelectionChangeEvent) => {
|
|
78
89
|
const { selection } = e.nativeEvent;
|
|
79
90
|
textComposer.setSelection(selection);
|
|
80
91
|
},
|
|
@@ -108,16 +119,14 @@ const AutoCompleteInputWithContext = (props: AutoCompleteInputPropsWithContext)
|
|
|
108
119
|
}, [command, cooldownActive, t]);
|
|
109
120
|
|
|
110
121
|
const handleContentSizeChange = useCallback(
|
|
111
|
-
({
|
|
112
|
-
nativeEvent: { contentSize },
|
|
113
|
-
}: NativeSyntheticEvent<TextInputContentSizeChangeEventData>) => {
|
|
122
|
+
({ nativeEvent: { contentSize } }: TextInputContentSizeChangeEvent) => {
|
|
114
123
|
setTextHeight(contentSize.height);
|
|
115
124
|
},
|
|
116
125
|
[],
|
|
117
126
|
);
|
|
118
127
|
|
|
119
128
|
return (
|
|
120
|
-
<
|
|
129
|
+
<TextInputComponent
|
|
121
130
|
autoFocus={!!command}
|
|
122
131
|
editable={enabled}
|
|
123
132
|
maxLength={maxMessageLength}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { Modal, SafeAreaView, StyleSheet, View } from 'react-native';
|
|
2
|
+
import { Modal, SafeAreaView, StyleSheet, TextInput, TextInputProps, View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
Gesture,
|
|
@@ -151,7 +151,14 @@ type MessageInputPropsWithContext = Pick<
|
|
|
151
151
|
> &
|
|
152
152
|
Pick<MessagesContextValue, 'Reply'> &
|
|
153
153
|
Pick<TranslationContextValue, 't'> &
|
|
154
|
-
Pick<MessageComposerAPIContextValue, 'clearEditingState'> & {
|
|
154
|
+
Pick<MessageComposerAPIContextValue, 'clearEditingState'> & {
|
|
155
|
+
editing: boolean;
|
|
156
|
+
TextInputComponent?: React.ComponentType<
|
|
157
|
+
TextInputProps & {
|
|
158
|
+
ref: React.Ref<TextInput> | undefined;
|
|
159
|
+
}
|
|
160
|
+
>;
|
|
161
|
+
};
|
|
155
162
|
|
|
156
163
|
const textComposerStateSelector = (state: TextComposerState) => ({
|
|
157
164
|
command: state.command,
|
|
@@ -207,6 +214,7 @@ const MessageInputWithContext = (props: MessageInputPropsWithContext) => {
|
|
|
207
214
|
ShowThreadMessageInChannelButton,
|
|
208
215
|
StartAudioRecordingButton,
|
|
209
216
|
StopMessageStreamingButton,
|
|
217
|
+
TextInputComponent,
|
|
210
218
|
watchers,
|
|
211
219
|
} = props;
|
|
212
220
|
|
|
@@ -504,6 +512,7 @@ const MessageInputWithContext = (props: MessageInputPropsWithContext) => {
|
|
|
504
512
|
<View style={[styles.autoCompleteInputContainer, autoCompleteInputContainer]}>
|
|
505
513
|
<AutoCompleteInput
|
|
506
514
|
cooldownActive={!!cooldownRemainingSeconds}
|
|
515
|
+
TextInputComponent={TextInputComponent}
|
|
507
516
|
{...additionalTextInputProps}
|
|
508
517
|
/>
|
|
509
518
|
</View>
|
|
@@ -2,7 +2,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
2
2
|
import {
|
|
3
3
|
FlatListProps,
|
|
4
4
|
FlatList as FlatListType,
|
|
5
|
-
Platform,
|
|
6
5
|
ScrollViewProps,
|
|
7
6
|
StyleSheet,
|
|
8
7
|
View,
|
|
@@ -739,9 +738,6 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
|
|
|
739
738
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
740
739
|
}, [targetedMessage]);
|
|
741
740
|
|
|
742
|
-
// TODO: do not apply on RN 0.73 and above
|
|
743
|
-
const shouldApplyAndroidWorkaround = inverted && Platform.OS === 'android';
|
|
744
|
-
|
|
745
741
|
const renderItem = useCallback(
|
|
746
742
|
({ index, item: message }: { index: number; item: LocalMessage }) => {
|
|
747
743
|
if (!channel || channel.disconnected || (!channel.initialized && !channel.offlineMode)) {
|
|
@@ -785,10 +781,7 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
|
|
|
785
781
|
);
|
|
786
782
|
|
|
787
783
|
return (
|
|
788
|
-
<View
|
|
789
|
-
style={[shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined]}
|
|
790
|
-
testID={`message-list-item-${index}`}
|
|
791
|
-
>
|
|
784
|
+
<View testID={`message-list-item-${index}`}>
|
|
792
785
|
{message.type === 'system' ? (
|
|
793
786
|
<MessageSystem
|
|
794
787
|
message={message}
|
|
@@ -832,7 +825,6 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
|
|
|
832
825
|
myMessageTheme,
|
|
833
826
|
onThreadSelect,
|
|
834
827
|
screenPadding,
|
|
835
|
-
shouldApplyAndroidWorkaround,
|
|
836
828
|
shouldShowUnreadUnderlay,
|
|
837
829
|
threadList,
|
|
838
830
|
],
|
|
@@ -1151,33 +1143,14 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
|
|
|
1151
1143
|
}
|
|
1152
1144
|
}
|
|
1153
1145
|
|
|
1154
|
-
const ListFooterComponent = useCallback(
|
|
1155
|
-
() => (
|
|
1156
|
-
<View style={shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined}>
|
|
1157
|
-
<FooterComponent />
|
|
1158
|
-
</View>
|
|
1159
|
-
),
|
|
1160
|
-
[shouldApplyAndroidWorkaround, FooterComponent],
|
|
1161
|
-
);
|
|
1146
|
+
const ListFooterComponent = useCallback(() => <FooterComponent />, [FooterComponent]);
|
|
1162
1147
|
|
|
1163
|
-
const ListHeaderComponent = useCallback(
|
|
1164
|
-
() => (
|
|
1165
|
-
<View style={shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined}>
|
|
1166
|
-
<HeaderComponent />
|
|
1167
|
-
</View>
|
|
1168
|
-
),
|
|
1169
|
-
[shouldApplyAndroidWorkaround, HeaderComponent],
|
|
1170
|
-
);
|
|
1148
|
+
const ListHeaderComponent = useCallback(() => <HeaderComponent />, [HeaderComponent]);
|
|
1171
1149
|
|
|
1172
1150
|
const ItemSeparatorComponent = additionalFlatListProps?.ItemSeparatorComponent;
|
|
1173
|
-
const WrappedItemSeparatorComponent = useCallback(
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
{ItemSeparatorComponent ? <ItemSeparatorComponent /> : null}
|
|
1177
|
-
</View>
|
|
1178
|
-
),
|
|
1179
|
-
[ItemSeparatorComponent, shouldApplyAndroidWorkaround],
|
|
1180
|
-
);
|
|
1151
|
+
const WrappedItemSeparatorComponent = useCallback(() => {
|
|
1152
|
+
return ItemSeparatorComponent ? <ItemSeparatorComponent /> : null;
|
|
1153
|
+
}, [ItemSeparatorComponent]);
|
|
1181
1154
|
|
|
1182
1155
|
// We need to omit the style related props from the additionalFlatListProps and add them directly instead of spreading
|
|
1183
1156
|
let additionalFlatListPropsExcludingStyle:
|
|
@@ -1195,13 +1168,8 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
|
|
|
1195
1168
|
}
|
|
1196
1169
|
|
|
1197
1170
|
const flatListStyle = useMemo(
|
|
1198
|
-
() => [
|
|
1199
|
-
|
|
1200
|
-
listContainer,
|
|
1201
|
-
additionalFlatListProps?.style,
|
|
1202
|
-
shouldApplyAndroidWorkaround ? styles.invertAndroid : undefined,
|
|
1203
|
-
],
|
|
1204
|
-
[additionalFlatListProps?.style, listContainer, shouldApplyAndroidWorkaround],
|
|
1171
|
+
() => [styles.listContainer, listContainer, additionalFlatListProps?.style],
|
|
1172
|
+
[additionalFlatListProps?.style, listContainer],
|
|
1205
1173
|
);
|
|
1206
1174
|
|
|
1207
1175
|
const flatListContentContainerStyle = useMemo(
|
|
@@ -1241,7 +1209,7 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
|
|
|
1241
1209
|
/** Disables the MessageList UI. Which means, message actions, reactions won't work. */
|
|
1242
1210
|
data={processedMessageList}
|
|
1243
1211
|
extraData={disabled}
|
|
1244
|
-
inverted={
|
|
1212
|
+
inverted={inverted}
|
|
1245
1213
|
ItemSeparatorComponent={WrappedItemSeparatorComponent}
|
|
1246
1214
|
keyboardShouldPersistTaps='handled'
|
|
1247
1215
|
keyExtractor={keyExtractor}
|
|
@@ -1264,7 +1232,7 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
|
|
|
1264
1232
|
onViewableItemsChanged={stableOnViewableItemsChanged}
|
|
1265
1233
|
ref={refCallback}
|
|
1266
1234
|
renderItem={renderItem}
|
|
1267
|
-
showsVerticalScrollIndicator={
|
|
1235
|
+
showsVerticalScrollIndicator={false}
|
|
1268
1236
|
style={flatListStyle}
|
|
1269
1237
|
testID='message-flat-list'
|
|
1270
1238
|
viewabilityConfig={flatListViewabilityConfig}
|