@droppii-org/chat-mobile 0.2.30 → 0.2.32
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.
- package/lib/module/assets/images/index.js +1 -0
- package/lib/module/assets/images/index.js.map +1 -1
- package/lib/module/assets/images/notification-warning.png +0 -0
- package/lib/module/components/ThreadCard/MuteThread.js +71 -31
- package/lib/module/components/ThreadCard/MuteThread.js.map +1 -1
- package/lib/module/components/ThreadCard/ThreadCard.js +13 -4
- package/lib/module/components/ThreadCard/ThreadCard.js.map +1 -1
- package/lib/module/components/messages/fileMessage/index.js +2 -1
- package/lib/module/components/messages/fileMessage/index.js.map +1 -1
- package/lib/module/context/ChatContext.js +46 -12
- package/lib/module/context/ChatContext.js.map +1 -1
- package/lib/module/context/global.js +6 -0
- package/lib/module/context/global.js.map +1 -0
- package/lib/module/core/useChatListener.js +33 -12
- package/lib/module/core/useChatListener.js.map +1 -1
- package/lib/module/hooks/message/useSendMessage.js +9 -3
- package/lib/module/hooks/message/useSendMessage.js.map +1 -1
- package/lib/module/hooks/query-keys.js +2 -1
- package/lib/module/hooks/query-keys.js.map +1 -1
- package/lib/module/hooks/useChatMessages.js +5 -1
- package/lib/module/hooks/useChatMessages.js.map +1 -1
- package/lib/module/hooks/useImageAttachment.js +2 -0
- package/lib/module/hooks/useImageAttachment.js.map +1 -1
- package/lib/module/hooks/useIsJoinedGroup.js +15 -0
- package/lib/module/hooks/useIsJoinedGroup.js.map +1 -0
- package/lib/module/index.js +9 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +1 -4
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -1
- package/lib/module/services/attachmentOrchestrator.js +3 -1
- package/lib/module/services/attachmentOrchestrator.js.map +1 -1
- package/lib/module/translation/resources/i18n.js +1 -1
- package/lib/module/translation/resources/i18n.js.map +1 -1
- package/lib/module/types/chat.js.map +1 -1
- package/lib/module/utils/device.js +1 -1
- package/lib/module/utils/device.js.map +1 -1
- package/lib/module/utils/messageUtils.js +1 -1
- package/lib/module/utils/messageUtils.js.map +1 -1
- package/lib/module/utils/toastFlashMessage.js +56 -0
- package/lib/module/utils/toastFlashMessage.js.map +1 -0
- package/lib/typescript/src/assets/images/index.d.ts +1 -0
- package/lib/typescript/src/assets/images/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/MuteThread.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
- package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
- package/lib/typescript/src/context/global.d.ts +3 -0
- package/lib/typescript/src/context/global.d.ts.map +1 -0
- package/lib/typescript/src/core/useChatListener.d.ts.map +1 -1
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts +3 -1
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts.map +1 -1
- package/lib/typescript/src/hooks/query-keys.d.ts +1 -0
- package/lib/typescript/src/hooks/query-keys.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useChatMessages.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useImageAttachment.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useIsJoinedGroup.d.ts +2 -0
- package/lib/typescript/src/hooks/useIsJoinedGroup.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -1
- package/lib/typescript/src/services/attachmentOrchestrator.d.ts.map +1 -1
- package/lib/typescript/src/types/chat.d.ts +4 -0
- package/lib/typescript/src/types/chat.d.ts.map +1 -1
- package/lib/typescript/src/types/imageUpload.d.ts +1 -1
- package/lib/typescript/src/types/imageUpload.d.ts.map +1 -1
- package/lib/typescript/src/utils/messageUtils.d.ts.map +1 -1
- package/lib/typescript/src/utils/toastFlashMessage.d.ts +12 -0
- package/lib/typescript/src/utils/toastFlashMessage.d.ts.map +1 -0
- package/package.json +5 -3
- package/src/assets/images/index.ts +1 -0
- package/src/assets/images/notification-warning.png +0 -0
- package/src/components/ThreadCard/MuteThread.tsx +70 -36
- package/src/components/ThreadCard/ThreadCard.tsx +11 -3
- package/src/components/messages/fileMessage/index.tsx +1 -0
- package/src/context/ChatContext.tsx +66 -9
- package/src/context/global.ts +6 -0
- package/src/core/useChatListener.ts +47 -11
- package/src/hooks/message/useSendMessage.ts +13 -9
- package/src/hooks/query-keys.ts +1 -0
- package/src/hooks/useChatMessages.ts +6 -2
- package/src/hooks/useImageAttachment.ts +2 -0
- package/src/hooks/useIsJoinedGroup.ts +13 -0
- package/src/index.tsx +10 -18
- package/src/screens/chat-detail/legend/LegendChatMessage.tsx +1 -5
- package/src/services/attachmentOrchestrator.ts +2 -0
- package/src/translation/resources/i18n.ts +1 -1
- package/src/types/chat.ts +4 -0
- package/src/types/imageUpload.ts +1 -1
- package/src/utils/device.ts +1 -1
- package/src/utils/messageUtils.ts +1 -3
- package/src/utils/toastFlashMessage.ts +67 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CustomMsgParams, MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
1
|
+
import type { CustomMsgParams, MessageItem, OfflinePush } from '@droppii/openim-rn-client-sdk';
|
|
2
|
+
import { MessageType } from '@droppii/openim-rn-client-sdk';
|
|
2
3
|
import { type CustomMessagePayload } from '../../types/chat';
|
|
3
4
|
import type { IUrlMetadata } from '../../types/common';
|
|
4
5
|
import type { IRunConversationFlowPayload } from '../../types/flows';
|
|
@@ -12,6 +13,7 @@ export declare const useSendMessage: () => {
|
|
|
12
13
|
retryMessage: (message: MessageItem) => Promise<void>;
|
|
13
14
|
revokeMessage: (message: MessageItem) => Promise<void>;
|
|
14
15
|
};
|
|
16
|
+
export declare const generateOfflinePushInfo: (contentType: MessageType, plainText: string) => OfflinePush;
|
|
15
17
|
export declare const createTextMessage: (text: string) => Promise<any>;
|
|
16
18
|
export declare const createUrlTextMessage: (text: string, urls: string[]) => Promise<any>;
|
|
17
19
|
export declare const createCustomMessage: (params: CustomMsgParams) => Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,WAAW,EACZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAiB,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,kBAAkB,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAerE,eAAO,MAAM,cAAc;oEAwCpB;QACD,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,YAAY,CAAC;QAC3B,IAAI,CAAC,EAAE,2BAA2B,CAAC;QACnC,aAAa,CAAC,EAAE,oBAAoB,CAAC;KACtC;4BA6De,WAAW;6BA8CqB,WAAW;CAqB9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,aAAa,WAAW,EACxB,WAAW,MAAM,KAoBZ,WACN,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,MAAM,MAAM,iBAUnD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,iBActE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,QAAQ,eAAe,iBAUhE,CAAC"}
|
|
@@ -14,6 +14,7 @@ export declare const conversationQueryKeys: {
|
|
|
14
14
|
runFlow: (conversationId: string) => string[];
|
|
15
15
|
detailByBotId: (botId: string) => string[];
|
|
16
16
|
detailBySourceId: (sourceId: string) => string[];
|
|
17
|
+
joinedGroup: (groupId?: string) => string[];
|
|
17
18
|
};
|
|
18
19
|
export type ConversationQueryKeys = typeof conversationQueryKeys;
|
|
19
20
|
//# sourceMappingURL=query-keys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../../../src/hooks/query-keys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;uBAEP,MAAM;CAC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;4BAGR,MAAM;;6BAGL,MAAM;2BAER,MAAM;mCACE,MAAM;gCAIT,MAAM;8BAIR,MAAM;2BACT,MAAM;iCACA,MAAM;
|
|
1
|
+
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../../../src/hooks/query-keys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;uBAEP,MAAM;CAC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;4BAGR,MAAM;;6BAGL,MAAM;2BAER,MAAM;mCACE,MAAM;gCAIT,MAAM;8BAIR,MAAM;2BACT,MAAM;iCACA,MAAM;4BACX,MAAM;CAC/B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatMessages.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useChatMessages.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useChatMessages.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useChatMessages.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAYlD,KAAK,sBAAsB,GAAG;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,OAAc,EACd,QAAa,GACd,EAAE,sBAAsB;;;;;;;;;;;;EA2NxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useImageAttachment.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useImageAttachment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,IAAI,WAAW,EAE5B,MAAM,gCAAgC,CAAC;AAUxC,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,WAAW,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,qBAAqB,EAAE,CAAC;IACxC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iBAAiB,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB,QAAO,
|
|
1
|
+
{"version":3,"file":"useImageAttachment.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useImageAttachment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,IAAI,WAAW,EAE5B,MAAM,gCAAgC,CAAC;AAUxC,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,WAAW,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,qBAAqB,EAAE,CAAC;IACxC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iBAAiB,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB,QAAO,wBA+NrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsJoinedGroup.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useIsJoinedGroup.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,mEAQhD,CAAC"}
|
|
@@ -22,10 +22,11 @@ export { AttachmentPreview } from './components/AttachmentPreview';
|
|
|
22
22
|
export { MediaViewerModal } from './components/MediaViewerModal';
|
|
23
23
|
export { Inbox } from './screens/inbox';
|
|
24
24
|
export { default as MediaViewerScreen } from './screens/MediaView';
|
|
25
|
-
export
|
|
26
|
-
export type {
|
|
25
|
+
export * from './screens/chat-detail';
|
|
26
|
+
export type { ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
27
27
|
export { LoginStatus, MessageType } from '@droppii/openim-rn-client-sdk';
|
|
28
|
-
export
|
|
28
|
+
export * from './screens/chat-detail';
|
|
29
|
+
export type { DChatActionItem, DChatActionIconProvider, DChatQuickAction, DChatPannelAction, ChatDetailProps, ChatDetailHeaderProps, ChatListProps, ChatComposerProps, ChatQuickActionsProps, ChatQuickActionsRenderParams, ChatPanelProps, } from './screens/chat-detail';
|
|
29
30
|
export { registerUIUtils, UIUtils } from './utils/UIUtils';
|
|
30
31
|
export { DFlowContext } from './types/flows';
|
|
31
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,6BAA6B,EAC7B,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE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AO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,cAAc,uBAAuB,CAAC;AAOtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACzE,cAAc,uBAAuB,CAAC;AACtC,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -12,6 +12,6 @@ interface LegendChatMessageProps {
|
|
|
12
12
|
onLongPress?: () => void;
|
|
13
13
|
customMessageItemFactory?: (m: DMessageItem) => ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, onMediaPress, onPressUrl, onRetry, onLongPress, customMessageItemFactory, }: LegendChatMessageProps) => import("react").JSX.Element>;
|
|
15
|
+
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, onMediaPress, onPressUrl, onRetry, onLongPress, customMessageItemFactory, }: LegendChatMessageProps) => string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>> | import("react").JSX.Element>;
|
|
16
16
|
export {};
|
|
17
17
|
//# sourceMappingURL=LegendChatMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatMessage.tsx"],"names":[],"mappings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EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,wBAAwB,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,SAAS,CAAC;CAC3D;AAyBD,eAAO,MAAM,iBAAiB,0JAUzB,sBAAsB,wRAkC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../../src/services/attachmentOrchestrator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"attachmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../../src/services/attachmentOrchestrator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAW7B,yBAAiB,6BAA6B,CAAC;IAC7C,SAAsB,uBAAuB,CAC3C,WAAW,EAAE,UAAU,EAAE,EACzB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,OAAO,GAAE,qBAAkD,GAC1D,OAAO,CAAC,oBAAoB,CAAC,CA6F/B;CA8MF"}
|
|
@@ -23,11 +23,15 @@ export interface ChatUIAdapter {
|
|
|
23
23
|
export interface ChatContextType {
|
|
24
24
|
logGA?: LogGA;
|
|
25
25
|
applicationType: DChatApplicationType;
|
|
26
|
+
onPressFlashMessage?: (message: ConversationItem) => void;
|
|
27
|
+
isShowFLashMessage: boolean;
|
|
28
|
+
setIsShowFLashMessage: (value: boolean) => void;
|
|
26
29
|
}
|
|
27
30
|
export type ChatProviderProps = PropsWithChildren<{
|
|
28
31
|
logGA?: LogGA;
|
|
29
32
|
applicationType: DChatApplicationType;
|
|
30
33
|
getChatToken: () => Promise<GetOpenIMTokenResponse | null>;
|
|
34
|
+
onFlashMessagePress?: (c: ConversationItem) => void;
|
|
31
35
|
}>;
|
|
32
36
|
export declare enum DChatApplicationType {
|
|
33
37
|
DROPPII = "DROPPII",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAErD,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,KAAK,KAAK,GAAG,CACX,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,GAAG,EACZ,QAAQ,CAAC,EAAE,GAAG,MAAM,OAAO,aAAa,EAAE,KACvC,IAAI,CAAC;AAEV,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAA;KAAE,CAAC;IACxC,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAA;KAAE,CAAC;IACxC,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAA;KAAE,CAAC;CACzC;AAED,MAAM,W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,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,OAAO,iBAAiB,CAAC,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageUpload.d.ts","sourceRoot":"","sources":["../../../../src/types/imageUpload.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"imageUpload.d.ts","sourceRoot":"","sources":["../../../../src/types/imageUpload.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/messageUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,eAAO,MAAM,gBAAgB,GAAI,SAAS,YAAY,KAAG,OACN,CAAC;AAEpD,eAAO,MAAM,kBAAkB,GAAI,SAAS,YAAY,KAAG,MAQ1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,YAAY,KAAG,
|
|
1
|
+
{"version":3,"file":"messageUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/messageUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,eAAO,MAAM,gBAAgB,GAAI,SAAS,YAAY,KAAG,OACN,CAAC;AAEpD,eAAO,MAAM,kBAAkB,GAAI,SAAS,YAAY,KAAG,MAQ1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,YAAY,KAAG,MAkEzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,SAAS,YAAY,GAAG,SAAS,EACjC,gBAAgB,MAAM,EACtB,eAAe,gBAAgB,KAC9B,MAkBF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface ShowFlashMessageParams {
|
|
2
|
+
key: string;
|
|
3
|
+
title: string;
|
|
4
|
+
body?: string;
|
|
5
|
+
onPress?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToastFlashMessage: {
|
|
8
|
+
show: (params: ShowFlashMessageParams) => void;
|
|
9
|
+
hide: (key: string) => void;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=toastFlashMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toastFlashMessage.d.ts","sourceRoot":"","sources":["../../../../src/utils/toastFlashMessage.ts"],"names":[],"mappings":"AAEA,UAAU,sBAAsB;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AA4BD,eAAO,MAAM,iBAAiB;mBACb,sBAAsB;gBAkBzB,MAAM;CAYnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@droppii-org/chat-mobile",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.32",
|
|
4
4
|
"description": "Droppii chat mobile",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@commitlint/config-conventional": "^20.5.0",
|
|
81
|
-
"@droppii/libs": "git+ssh://git@github.com:droppii/mobile-components.git#v1.1.
|
|
81
|
+
"@droppii/libs": "git+ssh://git@github.com:droppii/mobile-components.git#v1.1.17",
|
|
82
82
|
"@eslint/compat": "^2.0.3",
|
|
83
83
|
"@eslint/eslintrc": "^3.3.5",
|
|
84
84
|
"@eslint/js": "^10.0.1",
|
|
@@ -121,11 +121,12 @@
|
|
|
121
121
|
"react-native-mmkv": "4.0.0",
|
|
122
122
|
"react-native-permissions": "^5.6.0",
|
|
123
123
|
"react-native-photo-view": "git+ssh://git@github.com/droppii/react-native-photo-view.git",
|
|
124
|
-
"react-native-reanimated": "
|
|
124
|
+
"react-native-reanimated": "3.19.1",
|
|
125
125
|
"react-native-safe-area-context": "^5.8.0",
|
|
126
126
|
"react-native-snap-carousel": "3.9.0",
|
|
127
127
|
"react-native-svg": "^15.15.5",
|
|
128
128
|
"react-native-tab-view": "^4.3.1",
|
|
129
|
+
"react-native-toast-message": "^2.4.0",
|
|
129
130
|
"react-native-vector-icons": "*",
|
|
130
131
|
"react-native-video": "6.19.2",
|
|
131
132
|
"react-native-web": "~0.21.1",
|
|
@@ -156,6 +157,7 @@
|
|
|
156
157
|
"react-native-snap-carousel": "*",
|
|
157
158
|
"react-native-svg": "*",
|
|
158
159
|
"react-native-tab-view": "*",
|
|
160
|
+
"react-native-toast-message": "*",
|
|
159
161
|
"react-native-video": "*",
|
|
160
162
|
"zustand": "*"
|
|
161
163
|
},
|
|
@@ -5,6 +5,7 @@ const Images = {
|
|
|
5
5
|
ICON_PDF: require('./icon_pdf.png'),
|
|
6
6
|
ICON_TXT: require('./icon_txt.png'),
|
|
7
7
|
ICON_WORD: require('./icon_word.png'),
|
|
8
|
+
NOTIFICATION_WARNING: require('./notification-warning.png'),
|
|
8
9
|
TAG_BOT: require('./tag_bot.png'),
|
|
9
10
|
TAG_MALL: require('./tag_mall.png'),
|
|
10
11
|
ICON_DROPPII: require('./icon_droppii.png'),
|
|
Binary file
|
|
@@ -5,6 +5,8 @@ import { useMuteConversation } from '../../hooks/useMuteConversation';
|
|
|
5
5
|
import { trans } from '../../translation';
|
|
6
6
|
import { UIUtils } from '../../utils/UIUtils';
|
|
7
7
|
import { type ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
8
|
+
import { Image, StyleSheet } from 'react-native';
|
|
9
|
+
import Images from '../../assets/images';
|
|
8
10
|
|
|
9
11
|
interface MuteThreadProps {
|
|
10
12
|
isMuted: boolean;
|
|
@@ -17,37 +19,64 @@ export const MuteThread = memo(
|
|
|
17
19
|
const { muteConversation, unmuteConversation } = useMuteConversation();
|
|
18
20
|
|
|
19
21
|
const handleMutePress = useCallback(() => {
|
|
20
|
-
UIUtils.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
label: trans('chat:mute_confirm_secondary'),
|
|
47
|
-
kind: 'gray',
|
|
48
|
-
onPress: () => swipeableMethods.close(),
|
|
22
|
+
UIUtils.popup.open({
|
|
23
|
+
header: {
|
|
24
|
+
title: { text: trans('chat:mute_confirm_title') },
|
|
25
|
+
alignment: 'center',
|
|
26
|
+
},
|
|
27
|
+
body: {
|
|
28
|
+
renderContent: () => {
|
|
29
|
+
return (
|
|
30
|
+
<KContainer.View padding={'1rem'} justifyContent alignItems>
|
|
31
|
+
<KContainer.View paddingV={'1rem'}>
|
|
32
|
+
<Image
|
|
33
|
+
source={Images.NOTIFICATION_WARNING}
|
|
34
|
+
style={styles.notificationWarning}
|
|
35
|
+
/>
|
|
36
|
+
</KContainer.View>
|
|
37
|
+
<KLabel.RichText
|
|
38
|
+
typo="TextMdNormal"
|
|
39
|
+
richTextOptions={{
|
|
40
|
+
i18nKey: trans('chat:mute_confirm_desc'),
|
|
41
|
+
components: {
|
|
42
|
+
b: <KLabel.Text typo="TextMdBold" />,
|
|
43
|
+
},
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</KContainer.View>
|
|
47
|
+
);
|
|
49
48
|
},
|
|
50
|
-
|
|
49
|
+
},
|
|
50
|
+
actions: {
|
|
51
|
+
buttons: [
|
|
52
|
+
{
|
|
53
|
+
label: trans('chat:mute_confirm_secondary'),
|
|
54
|
+
kind: 'light',
|
|
55
|
+
onPress: () => swipeableMethods.close(),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: trans('chat:mute_confirm_primary'),
|
|
59
|
+
kind: 'primary',
|
|
60
|
+
onPress: async () => {
|
|
61
|
+
try {
|
|
62
|
+
await muteConversation(conversation);
|
|
63
|
+
UIUtils.toast.open({
|
|
64
|
+
title: trans('chat:mute_toast_success'),
|
|
65
|
+
theme: 'light',
|
|
66
|
+
});
|
|
67
|
+
} catch {
|
|
68
|
+
UIUtils.toast.open({
|
|
69
|
+
title: trans('chat:generic_error'),
|
|
70
|
+
theme: 'error',
|
|
71
|
+
});
|
|
72
|
+
} finally {
|
|
73
|
+
swipeableMethods.close();
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
type: 'horizontal-button',
|
|
79
|
+
},
|
|
51
80
|
});
|
|
52
81
|
}, [swipeableMethods, conversation, muteConversation]);
|
|
53
82
|
|
|
@@ -56,7 +85,7 @@ export const MuteThread = memo(
|
|
|
56
85
|
await unmuteConversation(conversation);
|
|
57
86
|
UIUtils.toast.open({
|
|
58
87
|
title: trans('chat:unmute_toast_success'),
|
|
59
|
-
theme: '
|
|
88
|
+
theme: 'light',
|
|
60
89
|
});
|
|
61
90
|
} catch {
|
|
62
91
|
UIUtils.toast.open({
|
|
@@ -73,15 +102,13 @@ export const MuteThread = memo(
|
|
|
73
102
|
width={76}
|
|
74
103
|
alignItems="center"
|
|
75
104
|
justifyContent="center"
|
|
76
|
-
background={
|
|
77
|
-
isMuted ? KColors.palette.gray.w400 : KColors.palette.danger.w400
|
|
78
|
-
}
|
|
105
|
+
background={KColors.gray.light}
|
|
79
106
|
onPress={isMuted ? handleUnmutePress : handleMutePress}
|
|
80
107
|
>
|
|
81
108
|
<KImage.VectorIcons
|
|
82
|
-
name={isMuted ? 'bell-
|
|
109
|
+
name={isMuted ? 'bell-b' : 'bell-off-b'}
|
|
83
110
|
provider="DroppiiNew"
|
|
84
|
-
size={
|
|
111
|
+
size={16}
|
|
85
112
|
color={KColors.white}
|
|
86
113
|
/>
|
|
87
114
|
<KLabel.Text
|
|
@@ -98,3 +125,10 @@ export const MuteThread = memo(
|
|
|
98
125
|
);
|
|
99
126
|
|
|
100
127
|
MuteThread.displayName = 'MuteThread';
|
|
128
|
+
|
|
129
|
+
const styles = StyleSheet.create({
|
|
130
|
+
notificationWarning: {
|
|
131
|
+
width: 120,
|
|
132
|
+
height: 144,
|
|
133
|
+
},
|
|
134
|
+
});
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
type MessageItem,
|
|
15
15
|
} from '@droppii/openim-rn-client-sdk';
|
|
16
16
|
import { MuteThread } from './MuteThread';
|
|
17
|
+
import { useIsJoinedGroup } from '../../hooks/useIsJoinedGroup';
|
|
18
|
+
import isEmpty from 'lodash/isEmpty';
|
|
17
19
|
|
|
18
20
|
interface ThreadCardProps {
|
|
19
21
|
item: string;
|
|
@@ -30,13 +32,19 @@ const ThreadCard = memo(({ item, onPress }: ThreadCardProps) => {
|
|
|
30
32
|
unreadCount = 0,
|
|
31
33
|
recvMsgOpt = MessageReceiveOptType.Normal,
|
|
32
34
|
isPinned,
|
|
33
|
-
isNotInGroup,
|
|
34
35
|
latestMsgSendTime,
|
|
35
36
|
latestMsg,
|
|
37
|
+
groupID,
|
|
36
38
|
} = conversation || {};
|
|
37
39
|
|
|
40
|
+
const { data: isJoinedGroup } = useIsJoinedGroup(groupID);
|
|
41
|
+
const isNotInGroup = groupID ? !isJoinedGroup : false;
|
|
42
|
+
|
|
38
43
|
const latestMsgData: MessageItem = useMemo(() => {
|
|
39
44
|
let result = null;
|
|
45
|
+
if (isEmpty(latestMsg)) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
40
48
|
try {
|
|
41
49
|
result = JSON.parse(latestMsg || '{}');
|
|
42
50
|
} catch (error) {
|
|
@@ -121,8 +129,8 @@ const ThreadCard = memo(({ item, onPress }: ThreadCardProps) => {
|
|
|
121
129
|
<KContainer.VisibleView visible={isMuted}>
|
|
122
130
|
<KContainer.View marginL="0.25rem">
|
|
123
131
|
<KImage.VectorIcons
|
|
124
|
-
name="bell-off"
|
|
125
|
-
provider="
|
|
132
|
+
name="bell-off-b"
|
|
133
|
+
provider="DroppiiNew"
|
|
126
134
|
size={16}
|
|
127
135
|
color={KColors.palette.gray.w500}
|
|
128
136
|
/>
|
|
@@ -4,10 +4,17 @@ import {
|
|
|
4
4
|
useContext,
|
|
5
5
|
useEffect,
|
|
6
6
|
useMemo,
|
|
7
|
+
useState,
|
|
7
8
|
} from 'react';
|
|
8
9
|
import type { ChatContextType, ChatProviderProps } from '../types/chat';
|
|
9
|
-
import OpenIMSDK, {
|
|
10
|
+
import OpenIMSDK, {
|
|
11
|
+
LoginStatus,
|
|
12
|
+
type ConversationItem,
|
|
13
|
+
} from '@droppii/openim-rn-client-sdk';
|
|
14
|
+
import Toast from 'react-native-toast-message';
|
|
10
15
|
import { useUserStore } from '../store';
|
|
16
|
+
import { useChatSdk } from '../core';
|
|
17
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
11
18
|
|
|
12
19
|
export const ChatContext = createContext<ChatContextType | undefined>(
|
|
13
20
|
undefined
|
|
@@ -26,12 +33,10 @@ const ChatProviderInner = ({
|
|
|
26
33
|
children,
|
|
27
34
|
applicationType,
|
|
28
35
|
getChatToken,
|
|
36
|
+
onFlashMessagePress,
|
|
29
37
|
}: ChatProviderProps) => {
|
|
30
38
|
const connectStatus = useUserStore((state) => state.connectStatus);
|
|
31
|
-
const
|
|
32
|
-
() => ({ logGA, applicationType, getChatToken }),
|
|
33
|
-
[logGA, applicationType, getChatToken]
|
|
34
|
-
);
|
|
39
|
+
const [isShowFLashMessage, setShow] = useState(true);
|
|
35
40
|
|
|
36
41
|
const handleSdkLogin = useCallback(async () => {
|
|
37
42
|
if (!!getChatToken && connectStatus === LoginStatus.Logout) {
|
|
@@ -55,9 +60,61 @@ const ChatProviderInner = ({
|
|
|
55
60
|
handleSdkLogin();
|
|
56
61
|
}, [handleSdkLogin]);
|
|
57
62
|
|
|
58
|
-
|
|
63
|
+
const onPressFlashMessage = useCallback(
|
|
64
|
+
(c: ConversationItem) => {
|
|
65
|
+
onFlashMessagePress?.(c);
|
|
66
|
+
},
|
|
67
|
+
[onFlashMessagePress]
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const setIsShowFLashMessage = useCallback((v: boolean) => {
|
|
71
|
+
console.log('setIsShowFLashMessage');
|
|
72
|
+
setShow(v);
|
|
73
|
+
}, []);
|
|
74
|
+
|
|
75
|
+
const value = useMemo(
|
|
76
|
+
() => ({
|
|
77
|
+
logGA,
|
|
78
|
+
applicationType,
|
|
79
|
+
getChatToken,
|
|
80
|
+
onPressFlashMessage,
|
|
81
|
+
isShowFLashMessage: isShowFLashMessage,
|
|
82
|
+
setIsShowFLashMessage: setIsShowFLashMessage,
|
|
83
|
+
}),
|
|
84
|
+
[
|
|
85
|
+
logGA,
|
|
86
|
+
applicationType,
|
|
87
|
+
getChatToken,
|
|
88
|
+
onPressFlashMessage,
|
|
89
|
+
isShowFLashMessage,
|
|
90
|
+
setIsShowFLashMessage,
|
|
91
|
+
]
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const { top } = useSafeAreaInsets();
|
|
95
|
+
return (
|
|
96
|
+
<ChatContext.Provider value={value}>
|
|
97
|
+
{
|
|
98
|
+
<>
|
|
99
|
+
<ChatSdkBridge />
|
|
100
|
+
{children}
|
|
101
|
+
<Toast topOffset={top} />
|
|
102
|
+
</>
|
|
103
|
+
}
|
|
104
|
+
</ChatContext.Provider>
|
|
105
|
+
);
|
|
59
106
|
};
|
|
60
107
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
108
|
+
// useChatSdk() -> useChatListener() -> useFlashMessagePress() reads from
|
|
109
|
+
// ChatContext via useChatContext(), which throws unless called by a
|
|
110
|
+
// descendant of ChatContext.Provider. ChatProviderInner IS the component
|
|
111
|
+
// that creates the Provider, so it cannot consume its own context — this
|
|
112
|
+
// bridge exists purely to run useChatSdk() one level below the Provider.
|
|
113
|
+
const ChatSdkBridge = () => {
|
|
114
|
+
useChatSdk();
|
|
115
|
+
return null;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const ChatProvider = ({ ...props }: ChatProviderProps) => {
|
|
119
|
+
return <ChatProviderInner {...props} />;
|
|
120
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import OpenIMSDK, {
|
|
2
|
+
MessageReceiveOptType,
|
|
2
3
|
OpenIMEvent,
|
|
3
4
|
type ConversationItem,
|
|
4
5
|
type GroupMemberItem,
|
|
@@ -7,10 +8,18 @@ import OpenIMSDK, {
|
|
|
7
8
|
} from '@droppii/openim-rn-client-sdk';
|
|
8
9
|
import { useCallback, useEffect } from 'react';
|
|
9
10
|
import { useConversationStore } from '../store/conversation';
|
|
11
|
+
import { ToastFlashMessage } from '../utils/toastFlashMessage';
|
|
12
|
+
import { useUserStore } from '../store/user';
|
|
13
|
+
import { getLastMessageText } from '../utils/messageUtils';
|
|
14
|
+
import { useChatContext } from '../context';
|
|
15
|
+
import isEmpty from 'lodash/isEmpty';
|
|
10
16
|
import { markMessageRevoked, useMessageStore } from '../store/message';
|
|
11
17
|
|
|
12
18
|
export const useChatListener = () => {
|
|
13
19
|
const updateOneMessage = useMessageStore((state) => state.updateOneMessage);
|
|
20
|
+
const currentUserId = useUserStore((s) => s.user?.userID);
|
|
21
|
+
const onPressFlashMessage = useChatContext()?.onPressFlashMessage;
|
|
22
|
+
const isShowFLashMessage = useChatContext()?.isShowFLashMessage;
|
|
14
23
|
|
|
15
24
|
const onSendMessageProgress = useCallback(
|
|
16
25
|
({ progress, message }: { progress: number; message: MessageItem }) => {
|
|
@@ -26,20 +35,39 @@ export const useChatListener = () => {
|
|
|
26
35
|
|
|
27
36
|
const onConversationChanged = useCallback(
|
|
28
37
|
(conversations: ConversationItem[]) => {
|
|
29
|
-
console.log('
|
|
30
|
-
count: conversations.length,
|
|
31
|
-
ids: conversations.map((c) => c.conversationID),
|
|
32
|
-
});
|
|
38
|
+
// console.log('isShowFLashMessage', isShowFLashMessage);
|
|
33
39
|
useConversationStore.getState().updateConversations(conversations);
|
|
40
|
+
if (isShowFLashMessage) {
|
|
41
|
+
for (const conversation of conversations) {
|
|
42
|
+
if (
|
|
43
|
+
conversation.recvMsgOpt === MessageReceiveOptType.NotNotify &&
|
|
44
|
+
!isEmpty(conversation?.latestMsg)
|
|
45
|
+
) {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const latestMsg = JSON.parse(conversation.latestMsg || '{}');
|
|
49
|
+
const lastMessageText = getLastMessageText(
|
|
50
|
+
latestMsg,
|
|
51
|
+
currentUserId,
|
|
52
|
+
conversation
|
|
53
|
+
);
|
|
54
|
+
ToastFlashMessage.show({
|
|
55
|
+
key: conversation.conversationID,
|
|
56
|
+
title: conversation.showName || 'New Message',
|
|
57
|
+
body: lastMessageText,
|
|
58
|
+
onPress: () => {
|
|
59
|
+
ToastFlashMessage.hide(conversation.conversationID);
|
|
60
|
+
onPressFlashMessage?.(conversation);
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
34
65
|
},
|
|
35
|
-
[]
|
|
66
|
+
[currentUserId, isShowFLashMessage, onPressFlashMessage]
|
|
36
67
|
);
|
|
37
68
|
|
|
38
69
|
const onNewConversation = useCallback((conversations: ConversationItem[]) => {
|
|
39
|
-
console.log('[Listener] OnNewConversation',
|
|
40
|
-
count: conversations.length,
|
|
41
|
-
ids: conversations.map((c) => c.conversationID),
|
|
42
|
-
});
|
|
70
|
+
console.log('[Listener] OnNewConversation', conversations);
|
|
43
71
|
useConversationStore.getState().updateConversations(conversations);
|
|
44
72
|
}, []);
|
|
45
73
|
|
|
@@ -65,6 +93,7 @@ export const useChatListener = () => {
|
|
|
65
93
|
// Conversation
|
|
66
94
|
OpenIMSDK.on(OpenIMEvent.OnConversationChanged, onConversationChanged);
|
|
67
95
|
OpenIMSDK.on(OpenIMEvent.OnNewConversation, onNewConversation);
|
|
96
|
+
// OpenIMSDK.on(OpenIMEvent.OnRecvNewMessages, onRecvNewMessages);
|
|
68
97
|
|
|
69
98
|
// Group members
|
|
70
99
|
OpenIMSDK.on(OpenIMEvent.OnGroupMemberAdded, onGroupMemberAdded);
|
|
@@ -85,8 +114,15 @@ export const useChatListener = () => {
|
|
|
85
114
|
|
|
86
115
|
// Message status
|
|
87
116
|
OpenIMSDK.off(OpenIMEvent.SendMessageProgress, onSendMessageProgress);
|
|
117
|
+
// OpenIMSDK.off(OpenIMEvent.OnRecvNewMessages, onRecvNewMessages);
|
|
88
118
|
OpenIMSDK.off(OpenIMEvent.OnNewRecvMessageRevoked, onMessageRevoked);
|
|
89
119
|
};
|
|
90
|
-
|
|
91
|
-
|
|
120
|
+
}, [
|
|
121
|
+
onConversationChanged,
|
|
122
|
+
onGroupMemberAdded,
|
|
123
|
+
onGroupMemberDeleted,
|
|
124
|
+
onMessageRevoked,
|
|
125
|
+
onNewConversation,
|
|
126
|
+
onSendMessageProgress,
|
|
127
|
+
]);
|
|
92
128
|
};
|