fix(search): wire up mark as unread in the search chats modal (#28136)

This commit is contained in:
G30
2026-08-17 00:34:49 -06:00
committed by GitHub
parent 736e38338e
commit 884388cac3
@@ -14,6 +14,7 @@
archiveChatById,
updateChatById,
updateChatFolderIdById,
markChatUnreadById,
getAllTags
} from '$lib/apis/chats';
import Spinner from '../common/Spinner.svelte';
@@ -87,6 +88,17 @@
}
};
const markUnreadHandler = async (id) => {
const res = await markChatUnreadById(localStorage.token, id).catch((error) => {
toast.error(`${error}`);
return null;
});
if (res) {
await refreshSidebar();
}
};
const archiveChatHandler = async (id) => {
try {
await archiveChatById(localStorage.token, id);
@@ -818,6 +830,9 @@
renameHandler={() => {
renameHandler(chat.id);
}}
markUnreadHandler={() => {
markUnreadHandler(chat.id);
}}
deleteHandler={() => {
menuChatId = chat.id;
menuChatTitle = chat.title;