agora-appbuilder-core 4.0.31-beta-3 → 4.0.31-beta-5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.31-beta-3",
3
+ "version": "4.0.31-beta-5",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -76,8 +76,8 @@ const DefaultConfig = {
76
76
  CHAT_ORG_NAME: '',
77
77
  CHAT_APP_NAME: '',
78
78
  CHAT_URL: '',
79
- CLI_VERSION: '3.0.30-1',
80
- CORE_VERSION: '4.0.30-1',
79
+ CLI_VERSION: '3.0.31-beta-5',
80
+ CORE_VERSION: '4.0.31-beta-5',
81
81
  DISABLE_LANDSCAPE_MODE: false,
82
82
  STT_AUTO_START: false,
83
83
  CLOUD_RECORDING_AUTO_START: false,
@@ -89,12 +89,17 @@ const ChatConfigure = ({children}) => {
89
89
  addReactionToPrivateStore,
90
90
  addReactionToStore,
91
91
  } = useChatMessages();
92
- const {setPinMsgId, setPinnedByUser} = useChatUIControls();
92
+ const {setPinMsgId, setPinnedByUser, privateChatUser} = useChatUIControls();
93
+ const privateChatUserRef = React.useRef(privateChatUser);
93
94
 
94
95
  React.useEffect(() => {
95
96
  defaultContentRef.current = defaultContent;
96
97
  }, [defaultContent]);
97
98
 
99
+ React.useEffect(() => {
100
+ privateChatUserRef.current = privateChatUser;
101
+ }, [privateChatUser]);
102
+
98
103
  useEffect(() => {
99
104
  const logout = async () => {
100
105
  try {
@@ -296,9 +301,13 @@ const ChatConfigure = ({children}) => {
296
301
  if (convId === data.chat.group_id) {
297
302
  addReactionToStore(msgId, reactions as unknown as Reaction[]);
298
303
  } else {
299
- const userId = operations[0].userId;
304
+ const fromUserID = operations[0].userId;
305
+ const uid =
306
+ localUid === fromUserID
307
+ ? Number(privateChatUserRef.current)
308
+ : Number(fromUserID);
300
309
  addReactionToPrivateStore(
301
- Number(userId),
310
+ uid,
302
311
  msgId,
303
312
  reactions as unknown as Reaction[],
304
313
  );
@@ -905,6 +905,7 @@ const style = StyleSheet.create({
905
905
  flexDirection: 'row',
906
906
  gap: 4,
907
907
  zIndex: 5,
908
+ elevation: -1,
908
909
  },
909
910
  reactionUserList: {
910
911
  position: 'absolute',
@@ -220,7 +220,7 @@ const ChatContainer = (props?: {
220
220
  ) : (
221
221
  <></>
222
222
  )}
223
- {pinMsgId && (
223
+ {pinMsgId && chatType === ChatType.Group && (
224
224
  <PinnedMessage pinMsgId={pinMsgId} pinnedByUser={pinnedByUser} />
225
225
  )}
226
226
  <ScrollView
@@ -346,6 +346,7 @@ const ChatContainer = (props?: {
346
346
  ext={message?.ext}
347
347
  reactions={message?.reactions}
348
348
  replyToMsgId={message?.replyToMsgId}
349
+ scrollOffset={scrollOffset}
349
350
  isLastMsg={
350
351
  privateMessageStore[privateChatUser].length - 1 ===
351
352
  index