@droppii-org/chat-mobile 0.2.53 → 0.2.55

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.
Files changed (70) hide show
  1. package/lib/module/components/Avatar/Avatar.utils.js +4 -2
  2. package/lib/module/components/Avatar/Avatar.utils.js.map +1 -1
  3. package/lib/module/components/Avatar/SingleAvatar.js +2 -0
  4. package/lib/module/components/Avatar/SingleAvatar.js.map +1 -1
  5. package/lib/module/components/ThreadCard/MuteThread.js +4 -61
  6. package/lib/module/components/ThreadCard/MuteThread.js.map +1 -1
  7. package/lib/module/hooks/useMuteConversation.js +66 -1
  8. package/lib/module/hooks/useMuteConversation.js.map +1 -1
  9. package/lib/module/index.js +1 -0
  10. package/lib/module/index.js.map +1 -1
  11. package/lib/module/screens/ChatInfo/ChatInfo.js +63 -0
  12. package/lib/module/screens/ChatInfo/ChatInfo.js.map +1 -0
  13. package/lib/module/screens/ChatInfo/ChatInfoActions.js +141 -0
  14. package/lib/module/screens/ChatInfo/ChatInfoActions.js.map +1 -0
  15. package/lib/module/screens/ChatInfo/ChatInfoMediaRow.js +58 -0
  16. package/lib/module/screens/ChatInfo/ChatInfoMediaRow.js.map +1 -0
  17. package/lib/module/screens/ChatInfo/ChatInfoProfile.js +129 -0
  18. package/lib/module/screens/ChatInfo/ChatInfoProfile.js.map +1 -0
  19. package/lib/module/screens/ChatInfo/index.js +4 -0
  20. package/lib/module/screens/ChatInfo/index.js.map +1 -0
  21. package/lib/module/screens/ChatInfo/types.js +4 -0
  22. package/lib/module/screens/ChatInfo/types.js.map +1 -0
  23. package/lib/module/screens/chat-detail/ChatDetail.js +5 -3
  24. package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
  25. package/lib/module/translation/resources/i18n.js +12 -0
  26. package/lib/module/translation/resources/i18n.js.map +1 -1
  27. package/lib/typescript/src/components/Avatar/Avatar.types.d.ts +1 -1
  28. package/lib/typescript/src/components/Avatar/Avatar.types.d.ts.map +1 -1
  29. package/lib/typescript/src/components/Avatar/Avatar.utils.d.ts +2 -0
  30. package/lib/typescript/src/components/Avatar/Avatar.utils.d.ts.map +1 -1
  31. package/lib/typescript/src/components/Avatar/SingleAvatar.d.ts.map +1 -1
  32. package/lib/typescript/src/components/ThreadCard/MuteThread.d.ts.map +1 -1
  33. package/lib/typescript/src/hooks/useMuteConversation.d.ts.map +1 -1
  34. package/lib/typescript/src/index.d.ts +2 -0
  35. package/lib/typescript/src/index.d.ts.map +1 -1
  36. package/lib/typescript/src/screens/ChatInfo/ChatInfo.d.ts +4 -0
  37. package/lib/typescript/src/screens/ChatInfo/ChatInfo.d.ts.map +1 -0
  38. package/lib/typescript/src/screens/ChatInfo/ChatInfoActions.d.ts +11 -0
  39. package/lib/typescript/src/screens/ChatInfo/ChatInfoActions.d.ts.map +1 -0
  40. package/lib/typescript/src/screens/ChatInfo/ChatInfoMediaRow.d.ts +7 -0
  41. package/lib/typescript/src/screens/ChatInfo/ChatInfoMediaRow.d.ts.map +1 -0
  42. package/lib/typescript/src/screens/ChatInfo/ChatInfoProfile.d.ts +8 -0
  43. package/lib/typescript/src/screens/ChatInfo/ChatInfoProfile.d.ts.map +1 -0
  44. package/lib/typescript/src/screens/ChatInfo/index.d.ts +3 -0
  45. package/lib/typescript/src/screens/ChatInfo/index.d.ts.map +1 -0
  46. package/lib/typescript/src/screens/ChatInfo/types.d.ts +11 -0
  47. package/lib/typescript/src/screens/ChatInfo/types.d.ts.map +1 -0
  48. package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts +1 -1
  49. package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
  50. package/lib/typescript/src/screens/chat-detail/types.d.ts +1 -1
  51. package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
  52. package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
  53. package/package.json +1 -1
  54. package/src/build-ignore.d.ts +1 -0
  55. package/src/components/Avatar/Avatar.types.ts +1 -1
  56. package/src/components/Avatar/Avatar.utils.ts +2 -0
  57. package/src/components/Avatar/SingleAvatar.tsx +2 -0
  58. package/src/components/ThreadCard/MuteThread.tsx +4 -61
  59. package/src/hooks/useMuteConversation.tsx +124 -0
  60. package/src/index.tsx +2 -0
  61. package/src/screens/ChatInfo/ChatInfo.tsx +61 -0
  62. package/src/screens/ChatInfo/ChatInfoActions.tsx +168 -0
  63. package/src/screens/ChatInfo/ChatInfoMediaRow.tsx +73 -0
  64. package/src/screens/ChatInfo/ChatInfoProfile.tsx +145 -0
  65. package/src/screens/ChatInfo/index.ts +2 -0
  66. package/src/screens/ChatInfo/types.ts +11 -0
  67. package/src/screens/chat-detail/ChatDetail.tsx +6 -3
  68. package/src/screens/chat-detail/types.ts +1 -1
  69. package/src/translation/resources/i18n.ts +12 -0
  70. package/src/hooks/useMuteConversation.ts +0 -59
@@ -1,59 +0,0 @@
1
- import { useCallback } from 'react';
2
- import OpenIMSDK, {
3
- MessageReceiveOptType,
4
- } from '@droppii/openim-rn-client-sdk';
5
- import type { ConversationItem } from '@droppii/openim-rn-client-sdk';
6
- import { UIUtils } from '../utils/UIUtils';
7
- import { trans } from '../translation';
8
-
9
- export function useMuteConversation() {
10
- const muteConversation = useCallback(
11
- async (conversation?: ConversationItem) => {
12
- if (conversation == null) return;
13
-
14
- try {
15
- await OpenIMSDK.setConversationRecvMessageOpt({
16
- conversationID: conversation.conversationID,
17
- opt: MessageReceiveOptType.NotNotify,
18
- });
19
- UIUtils.toast.open({
20
- title: trans('chat:mute_toast_success'),
21
- theme: 'light',
22
- });
23
- } catch (error) {
24
- console.error('muteConversation failed', error);
25
- UIUtils.toast.open({
26
- title: trans('chat:generic_error'),
27
- theme: 'error',
28
- });
29
- }
30
- },
31
- []
32
- );
33
-
34
- const unmuteConversation = useCallback(
35
- async (conversation?: ConversationItem) => {
36
- if (conversation == null) return;
37
-
38
- try {
39
- await OpenIMSDK.setConversationRecvMessageOpt({
40
- conversationID: conversation.conversationID,
41
- opt: MessageReceiveOptType.Normal,
42
- });
43
- UIUtils.toast.open({
44
- title: trans('chat:unmute_toast_success'),
45
- theme: 'light',
46
- });
47
- } catch (error) {
48
- console.error('unmuteConversation failed', error);
49
- UIUtils.toast.open({
50
- title: trans('chat:generic_error'),
51
- theme: 'error',
52
- });
53
- }
54
- },
55
- []
56
- );
57
-
58
- return { muteConversation, unmuteConversation };
59
- }