fix: bug in chat deletion pagination interact

change 1: when selecting a tag to filter the `tagView` store is set to disable paginated loading. This is so all tagged items can be loaded at once.  deleting a tag when in the filtered view returns to the unfiltered view. this change now sets the `tagView` store to `false` so pagination can continue

change 2: formatting
This commit is contained in:
Aryan Kothari
2024-08-03 11:52:52 -04:00
parent 067d76fece
commit f9e1a933a9
6 changed files with 24 additions and 21 deletions

View File

@@ -49,7 +49,7 @@
title: _title
});
await chats.set(
await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit)
await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit)
);
await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned'));
}
@@ -64,7 +64,7 @@
if (res) {
goto(`/c/${res.id}`);
await chats.set(
await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit)
await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit)
);
await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned'));
}
@@ -72,7 +72,7 @@
const archiveChatHandler = async (id) => {
await archiveChatById(localStorage.token, id);
await chats.set(await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit));
await chats.set(await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit));
await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned'));
};