whyuzeim 1.1.37 → 1.1.38

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.
@@ -37,8 +37,9 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
37
37
  var _useSDK = agoraChatUikit.useSDK(),
38
38
  MessageSDK = _useSDK.ChatSDK;
39
39
  var manulLoginRef = React.useRef(false);
40
- var _useConversationConte = agoraChatUikit.useConversationContext(),
41
- agoraCurrentConversation = _useConversationConte.currentConversation;
40
+ var _useConversationConte = agoraChatUikit.useConversationContext();
41
+ _useConversationConte.currentConversation;
42
+ var conversationList = _useConversationConte.conversationList;
42
43
  var _useContext = React.useContext(context.Context),
43
44
  http = _useContext.http,
44
45
  userInfo = _useContext.userInfo;
@@ -430,12 +431,15 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
430
431
  };
431
432
  }();
432
433
  React.useEffect(function () {
434
+ var _conversationList$fin;
433
435
  var cuiScrollList = document.querySelector(".cui-scrollList div");
434
436
  var generatingLoader = document.querySelector("#agent-generating-loader");
435
- if (cuiScrollList && generatingLoader) {
437
+ if (cuiScrollList && generatingLoader && ((_conversationList$fin = _findInstanceProperty(conversationList).call(conversationList, function (item) {
438
+ return item.conversationId === props.conversationId;
439
+ })) === null || _conversationList$fin === void 0 || (_conversationList$fin = _conversationList$fin.lastMessage) === null || _conversationList$fin === void 0 ? void 0 : _conversationList$fin.to) !== props.conversationId) {
436
440
  cuiScrollList.removeChild(generatingLoader);
437
441
  }
438
- }, [agoraCurrentConversation]);
442
+ }, [conversationList, props.conversationId]);
439
443
  return /*#__PURE__*/React.createElement("div", {
440
444
  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")
441
445
  }, loading ? /*#__PURE__*/React.createElement("div", {
@@ -35,8 +35,9 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
35
35
  var _useSDK = useSDK(),
36
36
  MessageSDK = _useSDK.ChatSDK;
37
37
  var manulLoginRef = useRef(false);
38
- var _useConversationConte = useConversationContext(),
39
- agoraCurrentConversation = _useConversationConte.currentConversation;
38
+ var _useConversationConte = useConversationContext();
39
+ _useConversationConte.currentConversation;
40
+ var conversationList = _useConversationConte.conversationList;
40
41
  var _useContext = useContext(Context),
41
42
  http = _useContext.http,
42
43
  userInfo = _useContext.userInfo;
@@ -428,12 +429,15 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
428
429
  };
429
430
  }();
430
431
  useEffect(function () {
432
+ var _conversationList$fin;
431
433
  var cuiScrollList = document.querySelector(".cui-scrollList div");
432
434
  var generatingLoader = document.querySelector("#agent-generating-loader");
433
- if (cuiScrollList && generatingLoader) {
435
+ if (cuiScrollList && generatingLoader && ((_conversationList$fin = _findInstanceProperty(conversationList).call(conversationList, function (item) {
436
+ return item.conversationId === props.conversationId;
437
+ })) === null || _conversationList$fin === void 0 || (_conversationList$fin = _conversationList$fin.lastMessage) === null || _conversationList$fin === void 0 ? void 0 : _conversationList$fin.to) !== props.conversationId) {
434
438
  cuiScrollList.removeChild(generatingLoader);
435
439
  }
436
- }, [agoraCurrentConversation]);
440
+ }, [conversationList, props.conversationId]);
437
441
  return /*#__PURE__*/React.createElement("div", {
438
442
  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")
439
443
  }, loading ? /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whyuzeim",
3
- "version": "1.1.37",
3
+ "version": "1.1.38",
4
4
  "description": "im componenets",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",