@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.
- package/lib/module/components/messages/groupNotificationMessage/index.js +5 -3
- package/lib/module/components/messages/groupNotificationMessage/index.js.map +1 -1
- package/lib/module/core/useChatListener.js +19 -5
- package/lib/module/core/useChatListener.js.map +1 -1
- package/lib/module/hooks/groups/useGroupAccessGuard.js +145 -0
- package/lib/module/hooks/groups/useGroupAccessGuard.js.map +1 -0
- package/lib/module/hooks/groups/useLeaveGroup.js +93 -0
- package/lib/module/hooks/groups/useLeaveGroup.js.map +1 -0
- package/lib/module/hooks/query-keys.js +2 -1
- package/lib/module/hooks/query-keys.js.map +1 -1
- package/lib/module/hooks/useConversationList.js +6 -9
- package/lib/module/hooks/useConversationList.js.map +1 -1
- package/lib/module/screens/ChatInfo/ChatInfo.js +17 -2
- package/lib/module/screens/ChatInfo/ChatInfo.js.map +1 -1
- package/lib/module/screens/ChatInfo/ChatInfoDescriptionRow.js +4 -1
- package/lib/module/screens/ChatInfo/ChatInfoDescriptionRow.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +12 -10
- package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetailHeader.js +3 -9
- package/lib/module/screens/chat-detail/ChatDetailHeader.js.map +1 -1
- package/lib/module/screens/inbox/CommunityTab.js +5 -2
- package/lib/module/screens/inbox/CommunityTab.js.map +1 -1
- package/lib/module/screens/inbox/MessagesTab.js +2 -2
- package/lib/module/screens/inbox/MessagesTab.js.map +1 -1
- package/lib/module/store/conversation.js +18 -20
- package/lib/module/store/conversation.js.map +1 -1
- package/lib/module/translation/resources/i18n.js +24 -2
- package/lib/module/translation/resources/i18n.js.map +1 -1
- package/lib/module/utils/conversation.js +4 -1
- package/lib/module/utils/conversation.js.map +1 -1
- package/lib/module/utils/legendListMessage.js +5 -1
- package/lib/module/utils/legendListMessage.js.map +1 -1
- package/lib/module/utils/messageUtils.js +118 -9
- package/lib/module/utils/messageUtils.js.map +1 -1
- package/lib/module/utils/toastFlashMessage.js +6 -0
- package/lib/module/utils/toastFlashMessage.js.map +1 -1
- package/lib/typescript/src/components/messages/groupNotificationMessage/index.d.ts.map +1 -1
- package/lib/typescript/src/core/useChatListener.d.ts.map +1 -1
- package/lib/typescript/src/hooks/groups/useGroupAccessGuard.d.ts +10 -0
- package/lib/typescript/src/hooks/groups/useGroupAccessGuard.d.ts.map +1 -0
- package/lib/typescript/src/hooks/groups/useLeaveGroup.d.ts +6 -0
- package/lib/typescript/src/hooks/groups/useLeaveGroup.d.ts.map +1 -0
- 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/useConversationList.d.ts.map +1 -1
- package/lib/typescript/src/screens/ChatInfo/ChatInfo.d.ts.map +1 -1
- package/lib/typescript/src/screens/ChatInfo/ChatInfoDescriptionRow.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts +0 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- package/lib/typescript/src/store/conversation.d.ts.map +1 -1
- package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
- package/lib/typescript/src/utils/conversation.d.ts.map +1 -1
- package/lib/typescript/src/utils/legendListMessage.d.ts.map +1 -1
- package/lib/typescript/src/utils/messageUtils.d.ts +6 -0
- package/lib/typescript/src/utils/messageUtils.d.ts.map +1 -1
- package/lib/typescript/src/utils/toastFlashMessage.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/components/messages/groupNotificationMessage/index.tsx +8 -4
- package/src/core/useChatListener.ts +29 -4
- package/src/hooks/groups/useGroupAccessGuard.ts +182 -0
- package/src/hooks/groups/useLeaveGroup.ts +104 -0
- package/src/hooks/query-keys.ts +1 -0
- package/src/hooks/useConversationList.ts +8 -17
- package/src/screens/ChatInfo/ChatInfo.tsx +27 -2
- package/src/screens/ChatInfo/ChatInfoDescriptionRow.tsx +5 -1
- package/src/screens/chat-detail/ChatDetail.tsx +11 -13
- package/src/screens/chat-detail/ChatDetailHeader.tsx +2 -6
- package/src/screens/chat-detail/types.ts +0 -1
- package/src/screens/inbox/CommunityTab.tsx +2 -2
- package/src/screens/inbox/MessagesTab.tsx +1 -1
- package/src/store/conversation.ts +14 -18
- package/src/translation/resources/i18n.ts +31 -1
- package/src/utils/conversation.ts +6 -3
- package/src/utils/legendListMessage.ts +5 -1
- package/src/utils/messageUtils.ts +128 -8
- 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() {
|