whyuzeim 1.1.24 → 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.
@@ -16,6 +16,7 @@ var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/insta
16
16
  var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
17
17
  var _setInterval = require('@babel/runtime-corejs3/core-js-stable/set-interval');
18
18
  var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
19
+ var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
19
20
  var React = require('react');
20
21
  var agoraChatUikit = require('agora-chat-uikit');
21
22
  var jsrsasign = require('jsrsasign');
@@ -38,6 +39,9 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
38
39
  onLoginSuccess = props.onLoginSuccess;
39
40
  var _useSDK = agoraChatUikit.useSDK(),
40
41
  MessageSDK = _useSDK.ChatSDK;
42
+ var _useConversationConte = agoraChatUikit.useConversationContext(),
43
+ agoraCurrentConversation = _useConversationConte.currentConversation,
44
+ conversationList = _useConversationConte.conversationList;
41
45
  var manulLoginRef = React.useRef(false);
42
46
  var _useContext = React.useContext(context.Context),
43
47
  http = _useContext.http,
@@ -449,8 +453,10 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
449
453
  };
450
454
  }();
451
455
  React.useEffect(function () {
452
- console.log(currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.lastMessage, 'fdsfsfs');
453
- }, [currentConversation]);
456
+ console.log(_JSON$stringify(_findInstanceProperty(conversationList).call(conversationList, function (item) {
457
+ return item.conversationId === agoraCurrentConversation.conversationId;
458
+ })), 'fdsfsfs1');
459
+ }, [agoraCurrentConversation]);
454
460
  return /*#__PURE__*/React.createElement("div", {
455
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")
456
462
  }, loading ? /*#__PURE__*/React.createElement("div", {
@@ -14,8 +14,9 @@ import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instanc
14
14
  import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
15
15
  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
+ import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
17
18
  import React, { useRef, useContext, useState, useCallback, useEffect } from 'react';
18
- 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';
19
20
  import jsrsasign from 'jsrsasign';
20
21
  import { Context } from '../IM/context.js';
21
22
  import { commonMessageInputConfig, commonMessageProps } from '../type.js';
@@ -36,6 +37,9 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
36
37
  onLoginSuccess = props.onLoginSuccess;
37
38
  var _useSDK = useSDK(),
38
39
  MessageSDK = _useSDK.ChatSDK;
40
+ var _useConversationConte = useConversationContext(),
41
+ agoraCurrentConversation = _useConversationConte.currentConversation,
42
+ conversationList = _useConversationConte.conversationList;
39
43
  var manulLoginRef = useRef(false);
40
44
  var _useContext = useContext(Context),
41
45
  http = _useContext.http,
@@ -447,8 +451,10 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
447
451
  };
448
452
  }();
449
453
  useEffect(function () {
450
- console.log(currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.lastMessage, 'fdsfsfs');
451
- }, [currentConversation]);
454
+ console.log(_JSON$stringify(_findInstanceProperty(conversationList).call(conversationList, function (item) {
455
+ return item.conversationId === agoraCurrentConversation.conversationId;
456
+ })), 'fdsfsfs1');
457
+ }, [agoraCurrentConversation]);
452
458
  return /*#__PURE__*/React.createElement("div", {
453
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")
454
460
  }, loading ? /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whyuzeim",
3
- "version": "1.1.24",
3
+ "version": "1.1.26",
4
4
  "description": "im componenets",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",