@droppii-org/chat-mobile 0.2.77 → 0.2.79

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 (79) hide show
  1. package/lib/module/components/messages/groupNotificationMessage/index.js +5 -3
  2. package/lib/module/components/messages/groupNotificationMessage/index.js.map +1 -1
  3. package/lib/module/core/useChatListener.js +19 -5
  4. package/lib/module/core/useChatListener.js.map +1 -1
  5. package/lib/module/hooks/groups/useGroupAccessGuard.js +145 -0
  6. package/lib/module/hooks/groups/useGroupAccessGuard.js.map +1 -0
  7. package/lib/module/hooks/groups/useLeaveGroup.js +93 -0
  8. package/lib/module/hooks/groups/useLeaveGroup.js.map +1 -0
  9. package/lib/module/hooks/query-keys.js +2 -1
  10. package/lib/module/hooks/query-keys.js.map +1 -1
  11. package/lib/module/hooks/useConversationList.js +6 -9
  12. package/lib/module/hooks/useConversationList.js.map +1 -1
  13. package/lib/module/screens/ChatInfo/ChatInfo.js +17 -2
  14. package/lib/module/screens/ChatInfo/ChatInfo.js.map +1 -1
  15. package/lib/module/screens/ChatInfo/ChatInfoDescriptionRow.js +4 -1
  16. package/lib/module/screens/ChatInfo/ChatInfoDescriptionRow.js.map +1 -1
  17. package/lib/module/screens/chat-detail/ChatDetail.js +12 -10
  18. package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
  19. package/lib/module/screens/chat-detail/ChatDetailHeader.js +3 -9
  20. package/lib/module/screens/chat-detail/ChatDetailHeader.js.map +1 -1
  21. package/lib/module/screens/inbox/CommunityTab.js +5 -2
  22. package/lib/module/screens/inbox/CommunityTab.js.map +1 -1
  23. package/lib/module/screens/inbox/MessagesTab.js +2 -2
  24. package/lib/module/screens/inbox/MessagesTab.js.map +1 -1
  25. package/lib/module/store/conversation.js +18 -20
  26. package/lib/module/store/conversation.js.map +1 -1
  27. package/lib/module/translation/resources/i18n.js +24 -2
  28. package/lib/module/translation/resources/i18n.js.map +1 -1
  29. package/lib/module/utils/conversation.js +4 -1
  30. package/lib/module/utils/conversation.js.map +1 -1
  31. package/lib/module/utils/legendListMessage.js +5 -1
  32. package/lib/module/utils/legendListMessage.js.map +1 -1
  33. package/lib/module/utils/messageUtils.js +118 -9
  34. package/lib/module/utils/messageUtils.js.map +1 -1
  35. package/lib/module/utils/toastFlashMessage.js +6 -0
  36. package/lib/module/utils/toastFlashMessage.js.map +1 -1
  37. package/lib/typescript/src/components/messages/groupNotificationMessage/index.d.ts.map +1 -1
  38. package/lib/typescript/src/core/useChatListener.d.ts.map +1 -1
  39. package/lib/typescript/src/hooks/groups/useGroupAccessGuard.d.ts +10 -0
  40. package/lib/typescript/src/hooks/groups/useGroupAccessGuard.d.ts.map +1 -0
  41. package/lib/typescript/src/hooks/groups/useLeaveGroup.d.ts +6 -0
  42. package/lib/typescript/src/hooks/groups/useLeaveGroup.d.ts.map +1 -0
  43. package/lib/typescript/src/hooks/query-keys.d.ts +1 -0
  44. package/lib/typescript/src/hooks/query-keys.d.ts.map +1 -1
  45. package/lib/typescript/src/hooks/useConversationList.d.ts.map +1 -1
  46. package/lib/typescript/src/screens/ChatInfo/ChatInfo.d.ts.map +1 -1
  47. package/lib/typescript/src/screens/ChatInfo/ChatInfoDescriptionRow.d.ts.map +1 -1
  48. package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
  49. package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts +1 -1
  50. package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts.map +1 -1
  51. package/lib/typescript/src/screens/chat-detail/types.d.ts +0 -1
  52. package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
  53. package/lib/typescript/src/store/conversation.d.ts.map +1 -1
  54. package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
  55. package/lib/typescript/src/utils/conversation.d.ts.map +1 -1
  56. package/lib/typescript/src/utils/legendListMessage.d.ts.map +1 -1
  57. package/lib/typescript/src/utils/messageUtils.d.ts +6 -0
  58. package/lib/typescript/src/utils/messageUtils.d.ts.map +1 -1
  59. package/lib/typescript/src/utils/toastFlashMessage.d.ts.map +1 -1
  60. package/package.json +5 -2
  61. package/src/components/messages/groupNotificationMessage/index.tsx +8 -4
  62. package/src/core/useChatListener.ts +29 -4
  63. package/src/hooks/groups/useGroupAccessGuard.ts +182 -0
  64. package/src/hooks/groups/useLeaveGroup.ts +104 -0
  65. package/src/hooks/query-keys.ts +1 -0
  66. package/src/hooks/useConversationList.ts +8 -17
  67. package/src/screens/ChatInfo/ChatInfo.tsx +27 -2
  68. package/src/screens/ChatInfo/ChatInfoDescriptionRow.tsx +5 -1
  69. package/src/screens/chat-detail/ChatDetail.tsx +11 -13
  70. package/src/screens/chat-detail/ChatDetailHeader.tsx +2 -6
  71. package/src/screens/chat-detail/types.ts +0 -1
  72. package/src/screens/inbox/CommunityTab.tsx +2 -2
  73. package/src/screens/inbox/MessagesTab.tsx +1 -1
  74. package/src/store/conversation.ts +14 -18
  75. package/src/translation/resources/i18n.ts +31 -1
  76. package/src/utils/conversation.ts +6 -3
  77. package/src/utils/legendListMessage.ts +5 -1
  78. package/src/utils/messageUtils.ts +128 -8
  79. package/src/utils/toastFlashMessage.ts +8 -2
@@ -1,4 +1,4 @@
1
- import Toast from 'react-native-toast-message';
1
+ import Toast, { type BaseToastProps } from 'react-native-toast-message';
2
2
 
3
3
  interface ShowFlashMessageParams {
4
4
  key: string;
@@ -16,6 +16,12 @@ const VISIBILITY_TIME_MS = 2000;
16
16
 
17
17
  const displayToast = (params: ShowFlashMessageParams) => {
18
18
  currentKey = params.key;
19
+ // `text2Props` isn't part of react-native-toast-message's own
20
+ // `ToastShowParams` type, but the `info` renderer registered in
21
+ // toastFlashMessageConfig.tsx spreads these show() params straight onto
22
+ // `<BaseToast>`, which does declare `text2Props` — so it works at runtime,
23
+ // it's just missing from the upstream type. Widen the type locally instead
24
+ // of casting the whole call to `any`.
19
25
  Toast.show({
20
26
  type: 'info',
21
27
  text1: params.title,
@@ -32,7 +38,7 @@ const displayToast = (params: ShowFlashMessageParams) => {
32
38
  avatarUrl: params?.avatarUrl,
33
39
  fullName: params.title,
34
40
  },
35
- });
41
+ } as Parameters<typeof Toast.show>[0] & Pick<BaseToastProps, 'text2Props'>);
36
42
  };
37
43
 
38
44
  function advanceQueue() {