@droppii-org/chat-sdk 0.1.13 → 0.1.14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageList.tsx"],"names":[],"mappings":"AA0BA,UAAU,gBAAgB;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC;AAGD,QAAA,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CA4U3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageList.tsx"],"names":[],"mappings":"AA2BA,UAAU,gBAAgB;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC;AAGD,QAAA,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CA4U3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -21,12 +21,13 @@ import { useChatContext } from "../../context/ChatContext";
21
21
  import { useRevokeMessage } from "../../hooks/message/useRevokeMessage";
22
22
  import { useConversationSessionState } from "../../hooks/session/useConversationSessionState";
23
23
  import { useJoinGroupFlow } from "../../hooks/session/useJoinGroupFlow";
24
+ import { ConnectStatus } from "../../types/chat";
24
25
  dayjs.extend(isToday);
25
26
  const BOTTOM_THRESHOLD = -5;
26
27
  const MessageList = (props) => {
27
28
  var _a;
28
29
  const { t } = useTranslation();
29
- const { user } = useChatContext();
30
+ const { user, connectStatus } = useChatContext();
30
31
  const { onClose, conversationId, searchClientMsgID, openCreateCannedModal } = props;
31
32
  const scrollRef = useRef(null);
32
33
  const conversationData = useConversationStore((state) => state.conversationData);
@@ -176,7 +177,7 @@ const MessageList = (props) => {
176
177
  return () => scrollContainer.removeEventListener("scroll", close);
177
178
  }, [openMenuId]);
178
179
  if (!conversationData) {
179
- return (_jsx("div", { className: "flex flex-1 items-center justify-center h-full", children: _jsx(Empty, { description: t("no_conversation_data") }) }));
180
+ return (_jsx("div", { className: "flex flex-1 items-center justify-center h-full", children: connectStatus !== ConnectStatus.Connected ? (_jsx(Spin, {})) : (_jsx(Empty, { description: t("no_conversation_data") })) }));
180
181
  }
181
182
  return (_jsxs("div", { className: "flex flex-col flex-1 relative h-full min-w-0", style: {
182
183
  backgroundImage: `url(${images.conversationBg})`,
@@ -1 +1 @@
1
- {"version":3,"file":"useGlobalEvent.d.ts","sourceRoot":"","sources":["../../../src/hooks/global/useGlobalEvent.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,cAAc,YAsQ1B,CAAC"}
1
+ {"version":3,"file":"useGlobalEvent.d.ts","sourceRoot":"","sources":["../../../src/hooks/global/useGlobalEvent.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,cAAc,YAuQ1B,CAAC"}
@@ -119,6 +119,7 @@ export const useGlobalEvent = () => {
119
119
  };
120
120
  const connectSuccessHandler = () => {
121
121
  updateConnectStatus(ConnectStatus.Connected);
122
+ getConversationListByReq(false);
122
123
  };
123
124
  const connectFailedHandler = () => {
124
125
  updateConnectStatus(ConnectStatus.Disconnected);