stream-chat-react-native-core 5.39.3 → 5.39.4-beta.2

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.
@@ -983,7 +983,9 @@ const MessageListWithContext = <
983
983
  });
984
984
  }
985
985
  // the message we want to scroll to has not been loaded in the state yet
986
- loadChannelAroundMessage({ messageId: messageIdToScroll });
986
+ if (indexOfParentInMessageList === -1) {
987
+ loadChannelAroundMessage({ messageId: messageIdToScroll });
988
+ }
987
989
  }, 50);
988
990
  // eslint-disable-next-line react-hooks/exhaustive-deps
989
991
  }, [targetedMessage, initialScrollToFirstUnreadMessage]);
@@ -372,8 +372,9 @@ describe('MessageList', () => {
372
372
  mockedLongMessagesList.push(generateMessage({ timestamp: new Date(), user: user1 }));
373
373
  }
374
374
  // could be any message that is not within the initially processed ones
375
- const { id: targetedMessageId, text: targetedMessageText } = mockedLongMessagesList[3];
376
- const latestMessageText = mockedLongMessagesList[mockedLongMessagesList.length - 1].text;
375
+ const latestMessageText = mockedLongMessagesList[0].text;
376
+ const { id: targetedMessageId, text: targetedMessageText } =
377
+ mockedLongMessagesList[mockedLongMessagesList.length - 4];
377
378
 
378
379
  const mockedChannel = generateChannelResponse({
379
380
  members: [generateMember({ user: user1 })],
@@ -168,12 +168,14 @@ const MessageOverlayWithContext = <
168
168
  );
169
169
 
170
170
  const {
171
- colors: { blue_alice, grey_gainsboro, grey_whisper, transparent, white_smoke },
171
+ colors: { blue_alice, grey_gainsboro, grey_whisper, transparent },
172
172
  messageSimple: {
173
173
  content: {
174
174
  container: { borderRadiusL, borderRadiusS },
175
175
  containerInner,
176
+ receiverMessageBackgroundColor,
176
177
  replyContainer,
178
+ senderMessageBackgroundColor,
177
179
  },
178
180
  },
179
181
  overlay: { container: containerStyle, padding: overlayPadding },
@@ -360,8 +362,8 @@ const MessageOverlayWithContext = <
360
362
  : grey_gainsboro
361
363
  : blue_alice
362
364
  : alignment === 'left'
363
- ? white_smoke
364
- : grey_gainsboro,
365
+ ? receiverMessageBackgroundColor
366
+ : senderMessageBackgroundColor,
365
367
  borderBottomLeftRadius:
366
368
  (groupStyle === 'left_bottom' || groupStyle === 'left_single') &&
367
369
  (!hasThreadReplies || threadList)
@@ -1096,8 +1096,10 @@ export const defaultTheme: Theme = {
1096
1096
  metaText: {
1097
1097
  fontSize: 12,
1098
1098
  },
1099
+ receiverMessageBackgroundColor: Colors.white,
1099
1100
  replyBorder: {},
1100
1101
  replyContainer: {},
1102
+ senderMessageBackgroundColor: Colors.grey_gainsboro,
1101
1103
  textContainer: {
1102
1104
  onlyEmojiMarkdown: { text: { fontSize: 50 } },
1103
1105
  },
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "5.39.3"
2
+ "version": "5.39.4-beta.2"
3
3
  }