|
@@ -151,7 +151,12 @@
|
|
|
|
|
|
currentChatPage.set(1);
|
|
currentChatPage.set(1);
|
|
allChatsLoaded = false;
|
|
allChatsLoaded = false;
|
|
- await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
|
|
|
|
|
+
|
|
|
|
+ if (search) {
|
|
|
|
+ await chats.set(await getChatListBySearchText(localStorage.token, search, $currentChatPage));
|
|
|
|
+ } else {
|
|
|
|
+ await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
|
|
|
+ }
|
|
|
|
|
|
// Enable pagination
|
|
// Enable pagination
|
|
scrollPaginationEnabled.set(true);
|
|
scrollPaginationEnabled.set(true);
|