Timothy J. Baek hai 6 meses
pai
achega
79cb9383d9
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      src/lib/components/layout/Sidebar.svelte

+ 2 - 4
src/lib/components/layout/Sidebar.svelte

@@ -243,11 +243,9 @@
 	const tagEventHandler = async (type, tagName, chatId) => {
 		console.log(type, tagName, chatId);
 		if (type === 'delete') {
-			currentChatPage.set(1);
-			await chats.set(await getChatListBySearchText(localStorage.token, search, $currentChatPage));
+			initChatList();
 		} else if (type === 'add') {
-			currentChatPage.set(1);
-			await chats.set(await getChatListBySearchText(localStorage.token, search, $currentChatPage));
+			initChatList();
 		}
 	};