vue-wiguet-chatweb 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/components/Chat.vue +2 -2
package/package.json
CHANGED
package/src/components/Chat.vue
CHANGED
@@ -212,7 +212,7 @@ const getMessages = async () => {
|
|
212
212
|
isLoading.value = true;
|
213
213
|
const lastMessagesId = messagesData.value.data[0]?.id;
|
214
214
|
const body: ListMessageBody = {
|
215
|
-
|
215
|
+
size: 10,
|
216
216
|
lastMessagesId,
|
217
217
|
appChatId: appChatId.value,
|
218
218
|
};
|
@@ -222,7 +222,7 @@ const getMessages = async () => {
|
|
222
222
|
...resp.data.sort((a, b) => -b.createdAt.localeCompare(a.createdAt))
|
223
223
|
);
|
224
224
|
messagesData.value.canLoadMoreMessages =
|
225
|
-
resp.pagination.total > resp.pagination.
|
225
|
+
resp.pagination.total > resp.pagination.size;
|
226
226
|
if (lastMessagesId && messageContainerRef.value?.scrollHeight) {
|
227
227
|
mantainElementsOnViewport(messageContainerRef.value?.scrollHeight);
|
228
228
|
}
|