whyuzeim 1.1.37 → 1.1.39

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,19 @@ 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) {
440
+ var _conversationList$fin2;
436
441
  cuiScrollList.removeChild(generatingLoader);
442
+ console.log((_conversationList$fin2 = _findInstanceProperty(conversationList).call(conversationList, function (item) {
443
+ return item.conversationId === props.conversationId;
444
+ })) === null || _conversationList$fin2 === void 0 || (_conversationList$fin2 = _conversationList$fin2.lastMessage) === null || _conversationList$fin2 === void 0 ? void 0 : _conversationList$fin2.to, props.conversationId, 'fdsfsd');
437
445
  }
438
- }, [agoraCurrentConversation]);
446
+ }, [conversationList, props.conversationId]);
439
447
  return /*#__PURE__*/React.createElement("div", {
440
448
  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
449
  }, 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,19 @@ 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) {
438
+ var _conversationList$fin2;
434
439
  cuiScrollList.removeChild(generatingLoader);
440
+ console.log((_conversationList$fin2 = _findInstanceProperty(conversationList).call(conversationList, function (item) {
441
+ return item.conversationId === props.conversationId;
442
+ })) === null || _conversationList$fin2 === void 0 || (_conversationList$fin2 = _conversationList$fin2.lastMessage) === null || _conversationList$fin2 === void 0 ? void 0 : _conversationList$fin2.to, props.conversationId, 'fdsfsd');
435
443
  }
436
- }, [agoraCurrentConversation]);
444
+ }, [conversationList, props.conversationId]);
437
445
  return /*#__PURE__*/React.createElement("div", {
438
446
  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
447
  }, 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.39",
4
4
  "description": "im componenets",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",