Skip to content

Commit 4da5a25

Browse files
Fixing broken thread issue
1 parent fcb543a commit 4da5a25

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
- Changes to add compatibility for Expo 36. Adding [netinfo](https://github.com/react-native-community/react-native-netinfo) as peer dependency - https://github.com/GetStream/stream-chat-react-native/issues/97
88
- Disabling the longpress on image viewer (in Attachment) - https://github.com/GetStream/stream-chat-react-native/issues/100 to avoid freezing of UI.
9+
- Fixing broken threads issue
910

1011
#### stream-chat-react-native (Native package)
1112

1213
- Disabling the longpress on image viewer (in Attachment) - https://github.com/GetStream/stream-chat-react-native/issues/100 to avoid freezing of UI.
14+
- Fixing broken threads issue
1315

1416
## [0.4.0] 2019-12-16
1517

src/components/MessageList.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,14 @@ const MessageList = withChannelContext(
264264
insertDates = (messages) => {
265265
const newMessages = [];
266266
if (messages.length === 0) {
267-
this.props.eventHistory.none.forEach((e) => {
268-
newMessages.push({
269-
type: 'channel.event',
270-
event: e,
267+
this.props.eventHistory &&
268+
this.props.eventHistory.none &&
269+
this.props.eventHistory.none.forEach((e) => {
270+
newMessages.push({
271+
type: 'channel.event',
272+
event: e,
273+
});
271274
});
272-
});
273275

274276
return newMessages;
275277
}

0 commit comments

Comments
 (0)