@droppii-org/chat-mobile 0.2.68 → 0.2.69
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/GroupItem/index.js +154 -0
- package/lib/module/components/GroupItem/index.js.map +1 -0
- package/lib/module/core/useChatListener.js +33 -2
- package/lib/module/core/useChatListener.js.map +1 -1
- package/lib/module/hooks/groups/useFetchPublicGroup.js +39 -0
- package/lib/module/hooks/groups/useFetchPublicGroup.js.map +1 -0
- package/lib/module/hooks/groups/useJoinGroup.js +42 -0
- package/lib/module/hooks/groups/useJoinGroup.js.map +1 -0
- package/lib/module/hooks/query-keys.js +6 -0
- package/lib/module/hooks/query-keys.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/SearchConversation/TabResult.js +1 -1
- package/lib/module/screens/SearchConversation/TabResult.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatComposer.js +29 -1
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +20 -2
- package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
- package/lib/module/screens/chat-detail/types.js.map +1 -1
- package/lib/module/screens/inbox/CommunityTab.js +55 -0
- package/lib/module/screens/inbox/CommunityTab.js.map +1 -0
- package/lib/module/screens/inbox/Inbox.js +51 -40
- package/lib/module/screens/inbox/Inbox.js.map +1 -1
- package/lib/module/translation/resources/i18n.js +8 -1
- package/lib/module/translation/resources/i18n.js.map +1 -1
- package/lib/typescript/src/components/GroupItem/index.d.ts +8 -0
- package/lib/typescript/src/components/GroupItem/index.d.ts.map +1 -0
- package/lib/typescript/src/core/useChatListener.d.ts.map +1 -1
- package/lib/typescript/src/hooks/groups/useFetchPublicGroup.d.ts +213 -0
- package/lib/typescript/src/hooks/groups/useFetchPublicGroup.d.ts.map +1 -0
- package/lib/typescript/src/hooks/groups/useJoinGroup.d.ts +5 -0
- package/lib/typescript/src/hooks/groups/useJoinGroup.d.ts.map +1 -0
- package/lib/typescript/src/hooks/query-keys.d.ts +6 -0
- package/lib/typescript/src/hooks/query-keys.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts +3 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts +2 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- package/lib/typescript/src/screens/inbox/CommunityTab.d.ts +6 -0
- package/lib/typescript/src/screens/inbox/CommunityTab.d.ts.map +1 -0
- package/lib/typescript/src/screens/inbox/Inbox.d.ts +2 -1
- package/lib/typescript/src/screens/inbox/Inbox.d.ts.map +1 -1
- package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/GroupItem/index.tsx +170 -0
- package/src/core/useChatListener.ts +53 -1
- package/src/hooks/groups/useFetchPublicGroup.ts +43 -0
- package/src/hooks/groups/useJoinGroup.ts +46 -0
- package/src/hooks/query-keys.ts +8 -0
- package/src/index.tsx +5 -1
- package/src/screens/SearchConversation/TabResult.tsx +1 -1
- package/src/screens/chat-detail/ChatComposer.tsx +35 -0
- package/src/screens/chat-detail/ChatDetail.tsx +25 -1
- package/src/screens/chat-detail/types.ts +5 -1
- package/src/screens/inbox/CommunityTab.tsx +65 -0
- package/src/screens/inbox/Inbox.tsx +51 -39
- package/src/translation/resources/i18n.ts +7 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { type SearchPublicGroupInfo } from '@droppii/openim-rn-client-sdk';
|
|
2
|
+
export declare const useFetchPublicGroup: (keyword: string) => {
|
|
3
|
+
error: Error;
|
|
4
|
+
isError: true;
|
|
5
|
+
isPending: false;
|
|
6
|
+
isLoading: false;
|
|
7
|
+
isLoadingError: false;
|
|
8
|
+
isRefetchError: true;
|
|
9
|
+
isSuccess: false;
|
|
10
|
+
isPlaceholderData: false;
|
|
11
|
+
status: "error";
|
|
12
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
13
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
14
|
+
hasNextPage: boolean;
|
|
15
|
+
hasPreviousPage: boolean;
|
|
16
|
+
isFetchNextPageError: boolean;
|
|
17
|
+
isFetchingNextPage: boolean;
|
|
18
|
+
isFetchPreviousPageError: boolean;
|
|
19
|
+
isFetchingPreviousPage: boolean;
|
|
20
|
+
dataUpdatedAt: number;
|
|
21
|
+
errorUpdatedAt: number;
|
|
22
|
+
failureCount: number;
|
|
23
|
+
failureReason: Error;
|
|
24
|
+
errorUpdateCount: number;
|
|
25
|
+
isFetched: boolean;
|
|
26
|
+
isFetchedAfterMount: boolean;
|
|
27
|
+
isFetching: boolean;
|
|
28
|
+
isInitialLoading: boolean;
|
|
29
|
+
isPaused: boolean;
|
|
30
|
+
isRefetching: boolean;
|
|
31
|
+
isStale: boolean;
|
|
32
|
+
isEnabled: boolean;
|
|
33
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
34
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
35
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>>;
|
|
36
|
+
dataFlatten: SearchPublicGroupInfo[];
|
|
37
|
+
} | {
|
|
38
|
+
error: null;
|
|
39
|
+
isError: false;
|
|
40
|
+
isPending: false;
|
|
41
|
+
isLoading: false;
|
|
42
|
+
isLoadingError: false;
|
|
43
|
+
isRefetchError: false;
|
|
44
|
+
isFetchNextPageError: false;
|
|
45
|
+
isFetchPreviousPageError: false;
|
|
46
|
+
isSuccess: true;
|
|
47
|
+
isPlaceholderData: false;
|
|
48
|
+
status: "success";
|
|
49
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
50
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
51
|
+
hasNextPage: boolean;
|
|
52
|
+
hasPreviousPage: boolean;
|
|
53
|
+
isFetchingNextPage: boolean;
|
|
54
|
+
isFetchingPreviousPage: boolean;
|
|
55
|
+
dataUpdatedAt: number;
|
|
56
|
+
errorUpdatedAt: number;
|
|
57
|
+
failureCount: number;
|
|
58
|
+
failureReason: Error;
|
|
59
|
+
errorUpdateCount: number;
|
|
60
|
+
isFetched: boolean;
|
|
61
|
+
isFetchedAfterMount: boolean;
|
|
62
|
+
isFetching: boolean;
|
|
63
|
+
isInitialLoading: boolean;
|
|
64
|
+
isPaused: boolean;
|
|
65
|
+
isRefetching: boolean;
|
|
66
|
+
isStale: boolean;
|
|
67
|
+
isEnabled: boolean;
|
|
68
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
69
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
70
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>>;
|
|
71
|
+
dataFlatten: SearchPublicGroupInfo[];
|
|
72
|
+
} | {
|
|
73
|
+
error: Error;
|
|
74
|
+
isError: true;
|
|
75
|
+
isPending: false;
|
|
76
|
+
isLoading: false;
|
|
77
|
+
isLoadingError: true;
|
|
78
|
+
isRefetchError: false;
|
|
79
|
+
isFetchNextPageError: false;
|
|
80
|
+
isFetchPreviousPageError: false;
|
|
81
|
+
isSuccess: false;
|
|
82
|
+
isPlaceholderData: false;
|
|
83
|
+
status: "error";
|
|
84
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
85
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
86
|
+
hasNextPage: boolean;
|
|
87
|
+
hasPreviousPage: boolean;
|
|
88
|
+
isFetchingNextPage: boolean;
|
|
89
|
+
isFetchingPreviousPage: boolean;
|
|
90
|
+
dataUpdatedAt: number;
|
|
91
|
+
errorUpdatedAt: number;
|
|
92
|
+
failureCount: number;
|
|
93
|
+
failureReason: Error;
|
|
94
|
+
errorUpdateCount: number;
|
|
95
|
+
isFetched: boolean;
|
|
96
|
+
isFetchedAfterMount: boolean;
|
|
97
|
+
isFetching: boolean;
|
|
98
|
+
isInitialLoading: boolean;
|
|
99
|
+
isPaused: boolean;
|
|
100
|
+
isRefetching: boolean;
|
|
101
|
+
isStale: boolean;
|
|
102
|
+
isEnabled: boolean;
|
|
103
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
104
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
105
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>>;
|
|
106
|
+
dataFlatten: SearchPublicGroupInfo[];
|
|
107
|
+
} | {
|
|
108
|
+
error: null;
|
|
109
|
+
isError: false;
|
|
110
|
+
isPending: true;
|
|
111
|
+
isLoading: true;
|
|
112
|
+
isLoadingError: false;
|
|
113
|
+
isRefetchError: false;
|
|
114
|
+
isFetchNextPageError: false;
|
|
115
|
+
isFetchPreviousPageError: false;
|
|
116
|
+
isSuccess: false;
|
|
117
|
+
isPlaceholderData: false;
|
|
118
|
+
status: "pending";
|
|
119
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
120
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
121
|
+
hasNextPage: boolean;
|
|
122
|
+
hasPreviousPage: boolean;
|
|
123
|
+
isFetchingNextPage: boolean;
|
|
124
|
+
isFetchingPreviousPage: boolean;
|
|
125
|
+
dataUpdatedAt: number;
|
|
126
|
+
errorUpdatedAt: number;
|
|
127
|
+
failureCount: number;
|
|
128
|
+
failureReason: Error;
|
|
129
|
+
errorUpdateCount: number;
|
|
130
|
+
isFetched: boolean;
|
|
131
|
+
isFetchedAfterMount: boolean;
|
|
132
|
+
isFetching: boolean;
|
|
133
|
+
isInitialLoading: boolean;
|
|
134
|
+
isPaused: boolean;
|
|
135
|
+
isRefetching: boolean;
|
|
136
|
+
isStale: boolean;
|
|
137
|
+
isEnabled: boolean;
|
|
138
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
139
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
140
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>>;
|
|
141
|
+
dataFlatten: SearchPublicGroupInfo[];
|
|
142
|
+
} | {
|
|
143
|
+
error: null;
|
|
144
|
+
isError: false;
|
|
145
|
+
isPending: true;
|
|
146
|
+
isLoadingError: false;
|
|
147
|
+
isRefetchError: false;
|
|
148
|
+
isFetchNextPageError: false;
|
|
149
|
+
isFetchPreviousPageError: false;
|
|
150
|
+
isSuccess: false;
|
|
151
|
+
isPlaceholderData: false;
|
|
152
|
+
status: "pending";
|
|
153
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
154
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
155
|
+
hasNextPage: boolean;
|
|
156
|
+
hasPreviousPage: boolean;
|
|
157
|
+
isFetchingNextPage: boolean;
|
|
158
|
+
isFetchingPreviousPage: boolean;
|
|
159
|
+
dataUpdatedAt: number;
|
|
160
|
+
errorUpdatedAt: number;
|
|
161
|
+
failureCount: number;
|
|
162
|
+
failureReason: Error;
|
|
163
|
+
errorUpdateCount: number;
|
|
164
|
+
isFetched: boolean;
|
|
165
|
+
isFetchedAfterMount: boolean;
|
|
166
|
+
isFetching: boolean;
|
|
167
|
+
isLoading: boolean;
|
|
168
|
+
isInitialLoading: boolean;
|
|
169
|
+
isPaused: boolean;
|
|
170
|
+
isRefetching: boolean;
|
|
171
|
+
isStale: boolean;
|
|
172
|
+
isEnabled: boolean;
|
|
173
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
174
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
175
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>>;
|
|
176
|
+
dataFlatten: SearchPublicGroupInfo[];
|
|
177
|
+
} | {
|
|
178
|
+
isError: false;
|
|
179
|
+
error: null;
|
|
180
|
+
isPending: false;
|
|
181
|
+
isLoading: false;
|
|
182
|
+
isLoadingError: false;
|
|
183
|
+
isRefetchError: false;
|
|
184
|
+
isSuccess: true;
|
|
185
|
+
isPlaceholderData: true;
|
|
186
|
+
isFetchNextPageError: false;
|
|
187
|
+
isFetchPreviousPageError: false;
|
|
188
|
+
status: "success";
|
|
189
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
190
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
191
|
+
hasNextPage: boolean;
|
|
192
|
+
hasPreviousPage: boolean;
|
|
193
|
+
isFetchingNextPage: boolean;
|
|
194
|
+
isFetchingPreviousPage: boolean;
|
|
195
|
+
dataUpdatedAt: number;
|
|
196
|
+
errorUpdatedAt: number;
|
|
197
|
+
failureCount: number;
|
|
198
|
+
failureReason: Error;
|
|
199
|
+
errorUpdateCount: number;
|
|
200
|
+
isFetched: boolean;
|
|
201
|
+
isFetchedAfterMount: boolean;
|
|
202
|
+
isFetching: boolean;
|
|
203
|
+
isInitialLoading: boolean;
|
|
204
|
+
isPaused: boolean;
|
|
205
|
+
isRefetching: boolean;
|
|
206
|
+
isStale: boolean;
|
|
207
|
+
isEnabled: boolean;
|
|
208
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>, Error>>;
|
|
209
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
210
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("@droppii/openim-rn-client-sdk").SearchPublicGroupsResult, unknown>>;
|
|
211
|
+
dataFlatten: SearchPublicGroupInfo[];
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=useFetchPublicGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchPublicGroup.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/groups/useFetchPublicGroup.ts"],"names":[],"mappings":"AAEA,OAAkB,EAEhB,KAAK,qBAAqB,EAC3B,MAAM,+BAA+B,CAAC;AAIvC,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiClD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type JoinGroupParams } from '@droppii/openim-rn-client-sdk';
|
|
2
|
+
export declare const useJoinGroup: () => import("@tanstack/react-query").UseMutationResult<unknown, Error, JoinGroupParams & {
|
|
3
|
+
groupName: string;
|
|
4
|
+
}, unknown>;
|
|
5
|
+
//# sourceMappingURL=useJoinGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useJoinGroup.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/groups/useJoinGroup.ts"],"names":[],"mappings":"AAAA,OAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAOhF,eAAO,MAAM,YAAY;eAK+B,MAAM;WAiC7D,CAAC"}
|
|
@@ -40,4 +40,10 @@ export declare const messageQueryKeys: {
|
|
|
40
40
|
all: readonly ["messages"];
|
|
41
41
|
search: (query: string, conversationId?: string) => readonly ["messages", "search", string, string];
|
|
42
42
|
};
|
|
43
|
+
export declare const groupQueryKeys: {
|
|
44
|
+
all: readonly ["groups"];
|
|
45
|
+
public: () => readonly ["groups", "public"];
|
|
46
|
+
publicSearch: (keyword: string) => readonly ["groups", "public", string];
|
|
47
|
+
join: () => readonly ["groups", "join"];
|
|
48
|
+
};
|
|
43
49
|
//# 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;0BAET,MAAM;yCACS,MAAM;2BAEpB,MAAM;mCACE,MAAM;gCAIT,MAAM;8BAIR,MAAM;mCACD,MAAM;2BAId,MAAM;iCACA,MAAM;4BACX,MAAM;sBACZ,MAAM;yBACH,MAAM;CAC5B,CAAC;AAEF,eAAO,MAAM,cAAc;;oBAET,MAAM,EAAE;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC;AAEjE,eAAO,MAAM,gBAAgB;;;6BAGF,MAAM;;CAGhC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;qBAEjB,MAAM,eAAe,MAAM;CAE7C,CAAC;AAEF,eAAO,MAAM,gBAAgB;;oBAEX,MAAM,mBAAmB,MAAM;CAEhD,CAAC"}
|
|
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;0BAET,MAAM;yCACS,MAAM;2BAEpB,MAAM;mCACE,MAAM;gCAIT,MAAM;8BAIR,MAAM;mCACD,MAAM;2BAId,MAAM;iCACA,MAAM;4BACX,MAAM;sBACZ,MAAM;yBACH,MAAM;CAC5B,CAAC;AAEF,eAAO,MAAM,cAAc;;oBAET,MAAM,EAAE;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC;AAEjE,eAAO,MAAM,gBAAgB;;;6BAGF,MAAM;;CAGhC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;qBAEjB,MAAM,eAAe,MAAM;CAE7C,CAAC;AAEF,eAAO,MAAM,gBAAgB;;oBAEX,MAAM,mBAAmB,MAAM;CAEhD,CAAC;AAEF,eAAO,MAAM,cAAc;;;4BAGD,MAAM;;CAG/B,CAAC"}
|
|
@@ -28,7 +28,7 @@ export { default as SearchMessage } from './screens/SearchMessage';
|
|
|
28
28
|
export * from './screens/chat-detail';
|
|
29
29
|
export * from './screens/ChatInfo';
|
|
30
30
|
export type { PeerType, MessageItem, ConversationItem, } from '@droppii/openim-rn-client-sdk';
|
|
31
|
-
export { LoginStatus, MessageType } from '@droppii/openim-rn-client-sdk';
|
|
31
|
+
export { LoginStatus, MessageType, GroupJoinSource, } from '@droppii/openim-rn-client-sdk';
|
|
32
32
|
export * from './screens/chat-detail';
|
|
33
33
|
export type { DChatActionItem, DChatActionIconProvider, DChatQuickAction, DChatPannelAction, ChatDetailProps, ChatDetailHeaderProps, ChatListProps, ChatComposerProps, ChatQuickActionsProps, ChatQuickActionsRenderParams, ChatPanelProps, } from './screens/chat-detail';
|
|
34
34
|
export type * from './screens/ChatInfo';
|
|
@@ -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,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,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BAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,mBAAmB,oBAAoB,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -7,7 +7,9 @@ interface ChatComposerInternalProps {
|
|
|
7
7
|
isComposeDisabled?: boolean;
|
|
8
8
|
composerRef?: RefObject<View | null>;
|
|
9
9
|
onComposerLayout?: (event: LayoutChangeEvent) => void;
|
|
10
|
+
onPressJoinGroup?: () => void;
|
|
11
|
+
isJoiningGroup?: boolean;
|
|
10
12
|
}
|
|
11
|
-
export declare const ChatComposer: import("react").MemoExoticComponent<({ isEmptyMessage, pannelActions, isComposeDisabled, composerRef, onComposerLayout, }: ChatComposerInternalProps) => import("react").JSX.Element>;
|
|
13
|
+
export declare const ChatComposer: import("react").MemoExoticComponent<({ isEmptyMessage, pannelActions, isComposeDisabled, composerRef, onComposerLayout, onPressJoinGroup, isJoiningGroup, }: ChatComposerInternalProps) => import("react").JSX.Element>;
|
|
12
14
|
export {};
|
|
13
15
|
//# sourceMappingURL=ChatComposer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AA8BtB,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AA8BtB,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAwB5E,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACrC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,YAAY,+JASpB,yBAAyB,iCA0f7B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ChatDetailProps } from './types';
|
|
2
|
-
declare const ChatDetail: import("react").MemoExoticComponent<({ targetConversationId, targetUserId, targetGroupId, targetBotId, targetMessageId, showAddMember, onBack, onPressSearch, onPressAddMember, onPressMenu, onPressUrl, customMessageItemFactory, pannelActions, }: ChatDetailProps) => import("react").JSX.Element>;
|
|
2
|
+
declare const ChatDetail: import("react").MemoExoticComponent<({ targetConversationId, targetUserId, targetGroupId, targetBotId, targetMessageId, showAddMember, onBack, onPressSearch, onPressAddMember, onPressMenu, onPressUrl, customMessageItemFactory, pannelActions, groupJoinSource, }: ChatDetailProps) => import("react").JSX.Element>;
|
|
3
3
|
export default ChatDetail;
|
|
4
4
|
//# sourceMappingURL=ChatDetail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDetail.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetail.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatDetail.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetail.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiB/C,QAAA,MAAM,UAAU,wQAgBX,eAAe,iCA6LnB,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { MediaItem } from '../../hooks/useMediaViewer';
|
|
3
3
|
import type { MeasuredRect } from './messageToolbox/types';
|
|
4
|
-
import type { MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
4
|
+
import type { GroupJoinSource, MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
5
5
|
export type DChatActionIconProvider = 'MaterialCommunityIcons' | 'DroppiiNew';
|
|
6
6
|
export declare enum DChatPannelActionItemType {
|
|
7
7
|
Gallery = "Gallery",
|
|
@@ -85,5 +85,6 @@ export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'showAddMem
|
|
|
85
85
|
onPressUrl?: (url: string) => void;
|
|
86
86
|
customMessageItemFactory?: (item: MessageItem) => ReactNode;
|
|
87
87
|
pannelActions?: DChatPannelAction[];
|
|
88
|
+
groupJoinSource?: GroupJoinSource;
|
|
88
89
|
}
|
|
89
90
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,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C,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAClE;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,qBAAqB,EACrB,eAAe,GAAG,gBAAgB,CACnC;IACC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,wBAAwB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,SAAS,CAAC;IAC5D,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACpC,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface CommunityTabProps {
|
|
2
|
+
onPressGroup?: (groupId: string) => void;
|
|
3
|
+
}
|
|
4
|
+
export declare const CommunityTab: import("react").MemoExoticComponent<({ onPressGroup }: CommunityTabProps) => import("react").JSX.Element>;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=CommunityTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommunityTab.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/CommunityTab.tsx"],"names":[],"mappings":"AAOA,UAAU,iBAAiB;IACzB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AACD,eAAO,MAAM,YAAY,yDAA2B,iBAAiB,iCAgDnE,CAAC"}
|
|
@@ -3,7 +3,8 @@ interface InboxProps {
|
|
|
3
3
|
onPressSearch?: () => void;
|
|
4
4
|
onPressEdit?: () => void;
|
|
5
5
|
onPressContact?: () => void;
|
|
6
|
+
onPressGroup?: (groupId: string) => void;
|
|
6
7
|
}
|
|
7
|
-
declare const Inbox: import("react").MemoExoticComponent<({ onPressThread, onPressSearch, onPressEdit, onPressContact, }: InboxProps) => import("react").JSX.Element>;
|
|
8
|
+
declare const Inbox: import("react").MemoExoticComponent<({ onPressThread, onPressSearch, onPressEdit, onPressContact, onPressGroup, }: InboxProps) => import("react").JSX.Element>;
|
|
8
9
|
export default Inbox;
|
|
9
10
|
//# sourceMappingURL=Inbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inbox.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/Inbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Inbox.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/Inbox.tsx"],"names":[],"mappings":"AAeA,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AASD,QAAA,MAAM,KAAK,qHAON,UAAU,iCAmGd,CAAC;AAIF,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/translation/resources/i18n.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/translation/resources/i18n.ts"],"names":[],"mappings":";;;AAgLA,wBAEE"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import {
|
|
2
|
+
KButton,
|
|
3
|
+
KColors,
|
|
4
|
+
KContainer,
|
|
5
|
+
KLabel,
|
|
6
|
+
KSpacingValue,
|
|
7
|
+
} from '@droppii/libs';
|
|
8
|
+
import {
|
|
9
|
+
GroupJoinSource,
|
|
10
|
+
type SearchPublicGroupInfo,
|
|
11
|
+
type SearchPublicGroupMemberInfo,
|
|
12
|
+
} from '@droppii/openim-rn-client-sdk';
|
|
13
|
+
import { memo, useCallback, useMemo } from 'react';
|
|
14
|
+
import { StyleSheet } from 'react-native';
|
|
15
|
+
import { Avatar } from '../Avatar';
|
|
16
|
+
import type { AvatarProps } from '../Avatar/Avatar.types';
|
|
17
|
+
import { trans } from '../../translation';
|
|
18
|
+
import { useJoinGroup } from '../../hooks/groups/useJoinGroup';
|
|
19
|
+
|
|
20
|
+
interface IGroupItemProps {
|
|
21
|
+
item: SearchPublicGroupInfo;
|
|
22
|
+
onPress?: (groupId: string) => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const buildAvatarProps = (
|
|
26
|
+
faceURL: string,
|
|
27
|
+
groupName: string,
|
|
28
|
+
members: SearchPublicGroupMemberInfo[]
|
|
29
|
+
): Pick<
|
|
30
|
+
AvatarProps,
|
|
31
|
+
| 'type'
|
|
32
|
+
| 'source'
|
|
33
|
+
| 'secondarySource'
|
|
34
|
+
| 'tertiarySource'
|
|
35
|
+
| 'remainingCount'
|
|
36
|
+
| 'fullName'
|
|
37
|
+
| 'secondaryFullName'
|
|
38
|
+
| 'tertiaryFullName'
|
|
39
|
+
> => {
|
|
40
|
+
if (faceURL) {
|
|
41
|
+
return { type: 'single', source: faceURL, fullName: groupName };
|
|
42
|
+
}
|
|
43
|
+
const [m0, m1, m2] = members;
|
|
44
|
+
if (members.length >= 4) {
|
|
45
|
+
return {
|
|
46
|
+
type: 'quad',
|
|
47
|
+
source: m0?.faceURL,
|
|
48
|
+
secondarySource: m1?.faceURL,
|
|
49
|
+
tertiarySource: m2?.faceURL,
|
|
50
|
+
remainingCount: members.length - 3,
|
|
51
|
+
fullName: m0?.nickname,
|
|
52
|
+
secondaryFullName: m1?.nickname,
|
|
53
|
+
tertiaryFullName: m2?.nickname,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (members.length === 3) {
|
|
57
|
+
return {
|
|
58
|
+
type: 'triple',
|
|
59
|
+
source: m0?.faceURL,
|
|
60
|
+
secondarySource: m1?.faceURL,
|
|
61
|
+
tertiarySource: m2?.faceURL,
|
|
62
|
+
fullName: m0?.nickname,
|
|
63
|
+
secondaryFullName: m1?.nickname,
|
|
64
|
+
tertiaryFullName: m2?.nickname,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (members.length === 2) {
|
|
68
|
+
return {
|
|
69
|
+
type: 'double',
|
|
70
|
+
source: m0?.faceURL,
|
|
71
|
+
secondarySource: m1?.faceURL,
|
|
72
|
+
fullName: m0?.nickname,
|
|
73
|
+
secondaryFullName: m1?.nickname,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return { type: 'single', source: faceURL, fullName: groupName };
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const GroupItem = memo((props: IGroupItemProps) => {
|
|
80
|
+
const { item, onPress } = props || {};
|
|
81
|
+
const {
|
|
82
|
+
groupID,
|
|
83
|
+
groupName = '',
|
|
84
|
+
memberCount = 0,
|
|
85
|
+
introduction = '',
|
|
86
|
+
faceURL = '',
|
|
87
|
+
isJoined = false,
|
|
88
|
+
members = [],
|
|
89
|
+
} = item || {};
|
|
90
|
+
|
|
91
|
+
const { mutate: joinGroup, isPending } = useJoinGroup();
|
|
92
|
+
|
|
93
|
+
const avatarProps = useMemo(
|
|
94
|
+
() => buildAvatarProps(faceURL, groupName, members),
|
|
95
|
+
[faceURL, groupName, members]
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const handleActionPress = useCallback(() => {
|
|
99
|
+
if (isJoined) {
|
|
100
|
+
onPress?.(groupID);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
joinGroup(
|
|
104
|
+
{ groupID, reqMsg: '', joinSource: GroupJoinSource.Search, groupName },
|
|
105
|
+
{ onSuccess: () => onPress?.(groupID) }
|
|
106
|
+
);
|
|
107
|
+
}, [isJoined, groupID, joinGroup, onPress, groupName]);
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<KContainer.Touchable
|
|
111
|
+
style={styles.item}
|
|
112
|
+
onPress={() => onPress?.(groupID)}
|
|
113
|
+
>
|
|
114
|
+
<Avatar size="md" {...avatarProps} />
|
|
115
|
+
<KContainer.View style={styles.itemContent}>
|
|
116
|
+
<KLabel.Text typo="TextMdMedium" numberOfLines={1}>
|
|
117
|
+
{groupName}
|
|
118
|
+
</KLabel.Text>
|
|
119
|
+
<KContainer.View style={styles.itemDescription}>
|
|
120
|
+
<KContainer.View flex>
|
|
121
|
+
<KLabel.Text
|
|
122
|
+
typo="TextNmNormal"
|
|
123
|
+
numberOfLines={1}
|
|
124
|
+
color={KColors.gray.normal}
|
|
125
|
+
>
|
|
126
|
+
{trans('group:member_count', { count: memberCount })}
|
|
127
|
+
</KLabel.Text>
|
|
128
|
+
<KContainer.VisibleView visible={!!introduction}>
|
|
129
|
+
<KLabel.Text
|
|
130
|
+
typo="TextNmNormal"
|
|
131
|
+
numberOfLines={1}
|
|
132
|
+
color={KColors.gray.normal}
|
|
133
|
+
>
|
|
134
|
+
{introduction}
|
|
135
|
+
</KLabel.Text>
|
|
136
|
+
</KContainer.VisibleView>
|
|
137
|
+
</KContainer.View>
|
|
138
|
+
<KButton.Solid
|
|
139
|
+
label={trans(isJoined ? 'group:access' : 'group:join')}
|
|
140
|
+
onPress={handleActionPress}
|
|
141
|
+
size="xs"
|
|
142
|
+
isLightSolid
|
|
143
|
+
kind={isJoined ? 'light' : 'primary'}
|
|
144
|
+
loading={isPending}
|
|
145
|
+
/>
|
|
146
|
+
</KContainer.View>
|
|
147
|
+
</KContainer.View>
|
|
148
|
+
</KContainer.Touchable>
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const styles = StyleSheet.create({
|
|
153
|
+
item: {
|
|
154
|
+
paddingVertical: KSpacingValue['0.5rem'],
|
|
155
|
+
flexDirection: 'row',
|
|
156
|
+
alignItems: 'center',
|
|
157
|
+
gap: KSpacingValue['0.5rem'],
|
|
158
|
+
borderBottomWidth: 1,
|
|
159
|
+
borderBlockColor: KColors.border.light,
|
|
160
|
+
},
|
|
161
|
+
itemContent: {
|
|
162
|
+
flex: 1,
|
|
163
|
+
},
|
|
164
|
+
itemDescription: {
|
|
165
|
+
flexDirection: 'row',
|
|
166
|
+
alignItems: 'center',
|
|
167
|
+
gap: KSpacingValue['0.5rem'],
|
|
168
|
+
justifyContent: 'space-between',
|
|
169
|
+
},
|
|
170
|
+
});
|
|
@@ -4,6 +4,7 @@ import OpenIMSDK, {
|
|
|
4
4
|
OpenIMEvent,
|
|
5
5
|
SessionType,
|
|
6
6
|
type ConversationItem,
|
|
7
|
+
type GroupApplicationItem,
|
|
7
8
|
type GroupItem,
|
|
8
9
|
type GroupMemberItem,
|
|
9
10
|
type MessageItem,
|
|
@@ -24,7 +25,7 @@ import { belongsToConversation } from '../utils/message';
|
|
|
24
25
|
import { getConversationID } from '../utils/conversation';
|
|
25
26
|
import { DeviceEventEmitter } from 'react-native';
|
|
26
27
|
import { ChatEvent } from '../types/events';
|
|
27
|
-
import { conversationQueryKeys } from '../hooks/query-keys';
|
|
28
|
+
import { conversationQueryKeys, groupQueryKeys } from '../hooks/query-keys';
|
|
28
29
|
|
|
29
30
|
export const useChatListener = () => {
|
|
30
31
|
const updateOneMessage = useMessageStore((state) => state.updateOneMessage);
|
|
@@ -266,6 +267,48 @@ export const useChatListener = () => {
|
|
|
266
267
|
[currentUserId]
|
|
267
268
|
);
|
|
268
269
|
|
|
270
|
+
const markGroupJoined = useCallback(
|
|
271
|
+
(groupID: string) => {
|
|
272
|
+
queryClient.invalidateQueries({
|
|
273
|
+
queryKey: conversationQueryKeys.joinedGroup(groupID),
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
queryClient.setQueriesData<{
|
|
277
|
+
pages: {
|
|
278
|
+
total: number;
|
|
279
|
+
groups: { groupID: string; isJoined: boolean }[];
|
|
280
|
+
}[];
|
|
281
|
+
pageParams: unknown[];
|
|
282
|
+
}>({ queryKey: groupQueryKeys.public(), exact: false }, (old) => {
|
|
283
|
+
if (!old) return old;
|
|
284
|
+
return {
|
|
285
|
+
...old,
|
|
286
|
+
pages: old.pages.map((page) => ({
|
|
287
|
+
...page,
|
|
288
|
+
groups: page.groups.map((g) =>
|
|
289
|
+
g.groupID === groupID ? { ...g, isJoined: true } : g
|
|
290
|
+
),
|
|
291
|
+
})),
|
|
292
|
+
};
|
|
293
|
+
});
|
|
294
|
+
},
|
|
295
|
+
[queryClient]
|
|
296
|
+
);
|
|
297
|
+
|
|
298
|
+
const onJoinedGroupAdded = useCallback(
|
|
299
|
+
(group: GroupItem) => {
|
|
300
|
+
markGroupJoined(group.groupID);
|
|
301
|
+
},
|
|
302
|
+
[markGroupJoined]
|
|
303
|
+
);
|
|
304
|
+
|
|
305
|
+
const onGroupApplicationAdded = useCallback(
|
|
306
|
+
(application: GroupApplicationItem) => {
|
|
307
|
+
markGroupJoined(application.groupID);
|
|
308
|
+
},
|
|
309
|
+
[markGroupJoined]
|
|
310
|
+
);
|
|
311
|
+
|
|
269
312
|
const onMessageRevoked = useCallback((revokedInfo: RevokedInfo) => {
|
|
270
313
|
markMessageRevoked(revokedInfo.clientMsgID);
|
|
271
314
|
}, []);
|
|
@@ -327,6 +370,8 @@ export const useChatListener = () => {
|
|
|
327
370
|
);
|
|
328
371
|
OpenIMSDK.on(OpenIMEvent.OnJoinedGroupDeleted, onJoinedGroupDeleted);
|
|
329
372
|
OpenIMSDK.on(OpenIMEvent.OnGroupDismissed, onGroupDismissed);
|
|
373
|
+
OpenIMSDK.on(OpenIMEvent.OnJoinedGroupAdded, onJoinedGroupAdded);
|
|
374
|
+
OpenIMSDK.on(OpenIMEvent.OnGroupApplicationAdded, onGroupApplicationAdded);
|
|
330
375
|
|
|
331
376
|
// Message status
|
|
332
377
|
OpenIMSDK.on(OpenIMEvent.SendMessageProgress, onSendMessageProgress);
|
|
@@ -353,6 +398,11 @@ export const useChatListener = () => {
|
|
|
353
398
|
);
|
|
354
399
|
OpenIMSDK.off(OpenIMEvent.OnJoinedGroupDeleted, onJoinedGroupDeleted);
|
|
355
400
|
OpenIMSDK.off(OpenIMEvent.OnGroupDismissed, onGroupDismissed);
|
|
401
|
+
OpenIMSDK.off(OpenIMEvent.OnJoinedGroupAdded, onJoinedGroupAdded);
|
|
402
|
+
OpenIMSDK.off(
|
|
403
|
+
OpenIMEvent.OnGroupApplicationAdded,
|
|
404
|
+
onGroupApplicationAdded
|
|
405
|
+
);
|
|
356
406
|
|
|
357
407
|
// Message status
|
|
358
408
|
OpenIMSDK.off(OpenIMEvent.SendMessageProgress, onSendMessageProgress);
|
|
@@ -378,5 +428,7 @@ export const useChatListener = () => {
|
|
|
378
428
|
OnGroupMemberInfoChanged,
|
|
379
429
|
onJoinedGroupDeleted,
|
|
380
430
|
onGroupDismissed,
|
|
431
|
+
onJoinedGroupAdded,
|
|
432
|
+
onGroupApplicationAdded,
|
|
381
433
|
]);
|
|
382
434
|
};
|