whyuzeim 1.1.25 → 1.1.26
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.
|
@@ -39,6 +39,9 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
39
39
|
onLoginSuccess = props.onLoginSuccess;
|
|
40
40
|
var _useSDK = agoraChatUikit.useSDK(),
|
|
41
41
|
MessageSDK = _useSDK.ChatSDK;
|
|
42
|
+
var _useConversationConte = agoraChatUikit.useConversationContext(),
|
|
43
|
+
agoraCurrentConversation = _useConversationConte.currentConversation,
|
|
44
|
+
conversationList = _useConversationConte.conversationList;
|
|
42
45
|
var manulLoginRef = React.useRef(false);
|
|
43
46
|
var _useContext = React.useContext(context.Context),
|
|
44
47
|
http = _useContext.http,
|
|
@@ -450,8 +453,10 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
450
453
|
};
|
|
451
454
|
}();
|
|
452
455
|
React.useEffect(function () {
|
|
453
|
-
console.log(_JSON$stringify(
|
|
454
|
-
|
|
456
|
+
console.log(_JSON$stringify(_findInstanceProperty(conversationList).call(conversationList, function (item) {
|
|
457
|
+
return item.conversationId === agoraCurrentConversation.conversationId;
|
|
458
|
+
})), 'fdsfsfs1');
|
|
459
|
+
}, [agoraCurrentConversation]);
|
|
455
460
|
return /*#__PURE__*/React.createElement("div", {
|
|
456
461
|
className: "bg-[var(--im-main-backgroundColor)] im-agent-mid ".concat((_props$className = props.className) !== null && _props$className !== void 0 ? _props$className : "", " w-full h-full overflow-hidden flex flex-col")
|
|
457
462
|
}, loading ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -16,7 +16,7 @@ import _setInterval from '@babel/runtime-corejs3/core-js-stable/set-interval';
|
|
|
16
16
|
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
17
17
|
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
18
18
|
import React, { useRef, useContext, useState, useCallback, useEffect } from 'react';
|
|
19
|
-
import { useClient, useSDK, rootStore, MessageList, MessageInput, ImageMessage, FileMessage, VideoMessage, BaseMessage } from 'agora-chat-uikit';
|
|
19
|
+
import { useClient, useSDK, useConversationContext, rootStore, MessageList, MessageInput, ImageMessage, FileMessage, VideoMessage, BaseMessage } from 'agora-chat-uikit';
|
|
20
20
|
import jsrsasign from 'jsrsasign';
|
|
21
21
|
import { Context } from '../IM/context.js';
|
|
22
22
|
import { commonMessageInputConfig, commonMessageProps } from '../type.js';
|
|
@@ -37,6 +37,9 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
37
37
|
onLoginSuccess = props.onLoginSuccess;
|
|
38
38
|
var _useSDK = useSDK(),
|
|
39
39
|
MessageSDK = _useSDK.ChatSDK;
|
|
40
|
+
var _useConversationConte = useConversationContext(),
|
|
41
|
+
agoraCurrentConversation = _useConversationConte.currentConversation,
|
|
42
|
+
conversationList = _useConversationConte.conversationList;
|
|
40
43
|
var manulLoginRef = useRef(false);
|
|
41
44
|
var _useContext = useContext(Context),
|
|
42
45
|
http = _useContext.http,
|
|
@@ -448,8 +451,10 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
448
451
|
};
|
|
449
452
|
}();
|
|
450
453
|
useEffect(function () {
|
|
451
|
-
console.log(_JSON$stringify(
|
|
452
|
-
|
|
454
|
+
console.log(_JSON$stringify(_findInstanceProperty(conversationList).call(conversationList, function (item) {
|
|
455
|
+
return item.conversationId === agoraCurrentConversation.conversationId;
|
|
456
|
+
})), 'fdsfsfs1');
|
|
457
|
+
}, [agoraCurrentConversation]);
|
|
453
458
|
return /*#__PURE__*/React.createElement("div", {
|
|
454
459
|
className: "bg-[var(--im-main-backgroundColor)] im-agent-mid ".concat((_props$className = props.className) !== null && _props$className !== void 0 ? _props$className : "", " w-full h-full overflow-hidden flex flex-col")
|
|
455
460
|
}, loading ? /*#__PURE__*/React.createElement("div", {
|